diff --git a/.github/Dockerfile b/.github/Dockerfile index 6d0b6468..c74bb739 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 cp /tea/$(uname -m) /usr/local/bin/tea +RUN touch /root/.bash_profile 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..ab9e5556 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/aarch64 - uses: actions/checkout@v4 with: diff --git a/.github/workflows/cd.www.yml b/.github/workflows/cd.www.yml index 3d010537..24144cff 100644 --- a/.github/workflows/cd.www.yml +++ b/.github/workflows/cd.www.yml @@ -27,26 +27,38 @@ jobs: - name: Unpack Binaries run: | + go() { + mkdir -p out/$2 + mv $1 tea + tar czf out/$2/$3.tgz tea + mv tea out/$2/$3 + + ls out/$2 + } + + ls + for filename in tea-*+*+*.tar.xz; do - tar xJf $filename - result="${filename#*+}" - result="${result%.tar.xz}" - mv tea tea-$result - rm $filename + echo $filename + + case $filename in + tea-*+darwin+aarch64) + go $filename Darwin arm64;; + tea-*+darwin+x86-64) + go $filename Darwin x86_64;; + tea-*+linux+aarch64) + go $filename Linux arm64 + go $filename Linux aarch64;; + tea-*+linux+x86-64) + go $filename Linux x86_64;; + esac done - name: Upload to S3 - run: | - 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 \ - --metadata-directive REPLACE --cache-control "max-age=3600, must-revalidate" - 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 \ - --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" + run: + aws s3 sync out/ s3://www.tea.xyz/ + --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].