Skip to content

Commit

Permalink
put .tgz at www.tea.xyz so we can have a one-liner
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 13, 2023
1 parent b4d925c commit d602fc3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/cd.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,17 @@ jobs:

- name: Unpack Binaries
run: |
mkdir products
for filename in tea-*+*+*.tar.xz; do
tar xJf $filename
result="${filename#*+}"
result="${result%.tar.xz}"
mv tea products/$result
mv tea $result
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
mkdir products
mv linux+x86-64 products/x86_64
mv linux+aarch64 products/aarch64
- uses: actions/checkout@v4
with:
Expand All @@ -60,6 +57,7 @@ jobs:
with:
images:
ghcr.io/${{ github.repository }}
teaxyz/cli
tags: |
type=sha
type=ref,event=branch
Expand Down
43 changes: 27 additions & 16 deletions .github/workflows/cd.www.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,32 @@ 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
}
for filename in tea-*+*+*.tar.xz; do
tar xJf $filename
result="${filename#*+}"
result="${result%.tar.xz}"
mv tea tea-$result
rm $filename
case $filename in
*+darwin+aarch64.tar.xz)
go $filename Darwin arm64;;
*+darwin+x86-64.tar.xz)
go $filename Darwin x86_64;;
*+linux+aarch64.tar.xz)
go $filename Linux arm64
go $filename Linux aarch64;;
*+linux+x86-64.tar.xz)
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:
Expand All @@ -60,3 +66,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
3 changes: 2 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/run/anywhere/terminals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down

0 comments on commit d602fc3

Please sign in to comment.