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 de45245
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 22 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
6 changes: 2 additions & 4 deletions .github/workflows/cd.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
49 changes: 33 additions & 16 deletions .github/workflows/cd.www.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
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 de45245

Please sign in to comment.