From cd8e328698c89e0ac70fa0976fc536c8d19c0fb5 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 13 Sep 2023 14:26:45 -0400 Subject: [PATCH] put .tgz at www.tea.xyz so we can have a one-liner --- .github/Dockerfile | 3 ++- .github/workflows/cd.docker.yml | 6 ++---- .github/workflows/cd.www.yml | 29 +++++++++++++++++++++++------ deno.lock | 3 ++- docs/run/anywhere/terminals.md | 6 ++++++ 5 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index 6d0b6468..db5569ac 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,6 +1,7 @@ FROM debian:buster-slim as stage0 COPY ./products/* /tea/ -RUN cp /tea/$(uname)+$(uname -m) /usr/local/bin/tea +RUN uname -m; ls /tea +RUN cp /tea/$(uname -m) /usr/local/bin/tea RUN tea integrate FROM debian:buster-slim as stage1 diff --git a/.github/workflows/cd.docker.yml b/.github/workflows/cd.docker.yml index 8108f9f6..83bfc6b0 100644 --- a/.github/workflows/cd.docker.yml +++ b/.github/workflows/cd.docker.yml @@ -33,10 +33,8 @@ jobs: rm $filename done - mv products/darwin+x86-64 products/Darwin+x86_64 - mv products/darwin+aarch64 products/Darwin+arm64 - mv products/linux+x86-64 products/Linux+x86_64 - mv products/linux+aarch64 products/Linux+arm64 + mv products/linux+x86-64 products/x86_64 + mv products/linux+aarch64 products/arm64 - uses: actions/checkout@v4 with: diff --git a/.github/workflows/cd.www.yml b/.github/workflows/cd.www.yml index 3d010537..c87b488a 100644 --- a/.github/workflows/cd.www.yml +++ b/.github/workflows/cd.www.yml @@ -31,22 +31,34 @@ jobs: tar xJf $filename result="${filename#*+}" result="${result%.tar.xz}" - mv tea tea-$result rm $filename + tar czf tea+$result.tgz tea + mv tea tea+$result done - name: Upload to S3 run: | - aws s3 cp tea-darwin+aarch64 s3://www.tea.xyz/Darwin/arm64 \ + aws s3 cp tea+darwin+aarch64 s3://www.tea.xyz/Darwin/arm64 \ --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" - aws s3 cp tea-darwin+x86-64 s3://www.tea.xyz/Darwin/x86_64 \ + aws s3 cp tea+darwin+x86-64 s3://www.tea.xyz/Darwin/x86_64 \ --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" - aws s3 cp tea-linux+aarch64 s3://www.tea.xyz/Linux/arm64 \ + aws s3 cp tea+linux+aarch64 s3://www.tea.xyz/Linux/arm64 \ --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" - aws s3 cp tea-linux+aarch64 s3://www.tea.xyz/Linux/aarch64 \ + aws s3 cp tea+linux+aarch64 s3://www.tea.xyz/Linux/aarch64 \ + --metadata+directive REPLACE --cache-control "max-age=3600, must-revalidate" + aws s3 cp tea+linux+x86-64 s3://www.tea.xyz/Linux/x86_64 \ + --metadata+directive REPLACE --cache-control "max-age=3600, must-revalidate" + + aws s3 cp tea+darwin+aarch64.tgz s3://www.tea.xyz/Darwin/arm64.tgz \ + --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" + aws s3 cp tea+darwin+x86-64.tgz s3://www.tea.xyz/Darwin/x86_64.tgz \ --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" - aws s3 cp tea-linux+x86-64 s3://www.tea.xyz/Linux/x86_64 \ + aws s3 cp tea+linux+aarch64.tgz s3://www.tea.xyz/Linux/arm64.tgz \ --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" + aws s3 cp tea+linux+aarch64.tgz s3://www.tea.xyz/Linux/aarch64.tgz \ + --metadata+directive REPLACE --cache-control "max-age=3600, must-revalidate" + aws s3 cp tea+linux+x86-64.tgz s3://www.tea.xyz/Linux/x86_64.tgz \ + --metadata+directive REPLACE --cache-control "max-age=3600, must-revalidate" - name: Invalidate CloudFront run: @@ -60,3 +72,8 @@ jobs: /Linux/arm64 /Linux/aarch64 /Linux/x86_64 + /Darwin/arm64.tgz + /Darwin/x86_64.tgz + /Linux/arm64.tgz + /Linux/aarch64.tgz + /Linux/x86_64.tgz diff --git a/deno.lock b/deno.lock index 8d1bc7b8..761a93bc 100644 --- a/deno.lock +++ b/deno.lock @@ -215,7 +215,8 @@ "https://deno.land/x/libtea@v0.13.0/src/utils/pkg.ts": "5ef9cc1955a5067489ac4d2af8615652505cb17a48745e811cb786ab89377547", "https://deno.land/x/libtea@v0.13.0/src/utils/semver.ts": "b4706e2343d48501cf552659e6f6f76f73ec6a59607ce4f8800b60d7769c12d9", "https://deno.land/x/outdent@v0.8.0/mod.ts": "72630e680dcc36d5ae556fbff6900b12706c81a6fd592345fc98bcc0878fb3ca", - "https://deno.land/x/outdent@v0.8.0/src/index.ts": "6dc3df4108d5d6fedcdb974844d321037ca81eaaa16be6073235ff3268841a22" + "https://deno.land/x/outdent@v0.8.0/src/index.ts": "6dc3df4108d5d6fedcdb974844d321037ca81eaaa16be6073235ff3268841a22", + "https://deno.land/x/semver@v1.4.1/mod.ts": "0b79c87562eb8a1f008ab0d98f8bb60076dd65bc06f1f8fdfac2d2dab162c27b" }, "npm": { "specifiers": { diff --git a/docs/run/anywhere/terminals.md b/docs/run/anywhere/terminals.md index 8262d3cf..c26a0dee 100644 --- a/docs/run/anywhere/terminals.md +++ b/docs/run/anywhere/terminals.md @@ -37,6 +37,12 @@ brew install teaxyz/pkgs/tea-cli tea --help ``` + For your convenience we provide a `.tgz` so you can one-liner that: + + ```sh + curl -#f https://tea.xyz/$(uname)/$(uname -m).tgz | sudo tar xz -C /usr/local/bin + ``` +   3. You can also download straight from [GitHub Releases].