Skip to content

Commit 8f98e69

Browse files
committed
feat: allow one-line install of the latest version
This re-implements #17 now that we have fixed the underlying issues that caused it to get reverted in the first place. I've done the documentation a bit differently to try and make it a bit cleaner. I also did not update the versioned artifacts that are due for removal in #68.
1 parent 093f4bf commit 8f98e69

2 files changed

Lines changed: 32 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ jobs:
3434
- run: cargo build --release --target x86_64-apple-darwin
3535
- run: lipo -create -output dotslash target/aarch64-apple-darwin/release/dotslash target/x86_64-apple-darwin/release/dotslash
3636
# Package universal binary
37-
- run: tar -czvf "dotslash-macos.tar.gz" dotslash
37+
- run: tar -czvf dotslash-macos.tar.gz --options gzip:compression-level=9 dotslash
3838
shell: bash
3939
# Package architecture-specific binaries
40-
- run: tar -czvf "dotslash-macos-arm64.tar.gz" -C target/aarch64-apple-darwin/release dotslash
40+
- run: tar -czvf dotslash-macos-arm64.tar.gz -C target/aarch64-apple-darwin/release --options gzip:compression-level=9 dotslash
4141
shell: bash
42-
- run: tar -czvf "dotslash-macos-x86_64.tar.gz" -C target/x86_64-apple-darwin/release dotslash
42+
- run: tar -czvf dotslash-macos-x86_64.tar.gz -C target/x86_64-apple-darwin/release --options gzip:compression-level=9 dotslash
4343
shell: bash
4444
# Upload all binaries
4545
- name: upload release
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
shell: bash
4949
run: |
50-
gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-macos.tar.gz"
51-
gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-macos-arm64.tar.gz"
52-
gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-macos-x86_64.tar.gz"
50+
gh release upload "${GITHUB_REF#refs/tags/}" dotslash-macos.tar.gz
51+
gh release upload "${GITHUB_REF#refs/tags/}" dotslash-macos-arm64.tar.gz
52+
gh release upload "${GITHUB_REF#refs/tags/}" dotslash-macos-x86_64.tar.gz
5353
# TODO(#68): Deprecated; will be removed in a future release!
5454
# Package universal binary
5555
- run: tar -czvf "dotslash-macos.${GITHUB_REF#refs/tags/}.tar.gz" dotslash
@@ -79,12 +79,12 @@ jobs:
7979
- run: cargo test
8080
- run: cargo clippy
8181
- run: cargo build --release
82-
- run: tar -czvf "dotslash-ubuntu-22.04.x86_64.tar.gz" -C target/release dotslash
82+
- run: tar -cvf dotslash-ubuntu-22.04.x86_64.tar.gz -I 'gzip -9' -C target/release dotslash
8383
- name: upload release
8484
env:
8585
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8686
shell: bash
87-
run: gh release upload "${GITHUB_REF#refs/tags/}" "dotslash-ubuntu-22.04.x86_64.tar.gz"
87+
run: gh release upload "${GITHUB_REF#refs/tags/}" dotslash-ubuntu-22.04.x86_64.tar.gz
8888
# TODO(#68): Deprecated; will be removed in a future release!
8989
- run: tar -czvf "dotslash-ubuntu-22.04.x86_64.${GITHUB_REF#refs/tags/}.tar.gz" -C target/release dotslash
9090
- name: upload versioned release
@@ -109,7 +109,7 @@ jobs:
109109
- run: cargo build --target aarch64-unknown-linux-gnu --release
110110
env:
111111
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
112-
- run: tar -czvf "dotslash-ubuntu-22.04.aarch64.tar.gz" -C target/aarch64-unknown-linux-gnu/release dotslash
112+
- run: tar -cvf dotslash-ubuntu-22.04.aarch64.tar.gz -I 'gzip -9' -C target/aarch64-unknown-linux-gnu/release dotslash
113113
- name: upload release
114114
env:
115115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -139,7 +139,7 @@ jobs:
139139
- run: cargo test
140140
- run: cargo clippy
141141
- run: cargo build --target x86_64-unknown-linux-musl --release
142-
- run: tar -czvf "dotslash-linux-musl.x86_64.tar.gz" -C target/x86_64-unknown-linux-musl/release dotslash
142+
- run: tar -cvf dotslash-linux-musl.x86_64.tar.gz -I 'gzip -9' -C target/x86_64-unknown-linux-musl/release dotslash
143143
- name: upload release
144144
env:
145145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -167,7 +167,7 @@ jobs:
167167
crate: cross
168168
version: latest
169169
- run: cross build --target aarch64-unknown-linux-musl --release
170-
- run: tar -czvf "dotslash-linux-musl.aarch64.tar.gz" -C target/aarch64-unknown-linux-musl/release dotslash
170+
- run: tar -cvf dotslash-linux-musl.aarch64.tar.gz -I 'gzip -9' -C target/aarch64-unknown-linux-musl/release dotslash
171171
- name: upload release
172172
env:
173173
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -191,7 +191,7 @@ jobs:
191191
- run: cargo test
192192
- run: cargo clippy
193193
- run: cargo build --release
194-
- run: tar czvf dotslash-windows.tar.gz -C target/release dotslash.exe
194+
- run: tar czvf dotslash-windows.tar.gz --options gzip:compression-level=9 -C target/release dotslash.exe
195195
shell: cmd
196196
- name: upload release
197197
env:

website/docs/installation.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ We provide prebuilt binaries for macOS, [Ubuntu] Linux, and Windows on GitHub:
2323

2424
<https://github.com/facebook/dotslash/releases/latest>
2525

26-
For the reasons explained above, the macOS release is a Universal Binary.
27-
2826
Once you have downloaded DotSlash, you must ensure that `dotslash` (or
2927
`dotslash.exe` on Windows) is on your `PATH`. You can test that it is setup
3028
correctly on Mac or Linux by running:
@@ -33,6 +31,20 @@ correctly on Mac or Linux by running:
3331
/usr/bin/env dotslash --help
3432
```
3533

34+
### Linux
35+
36+
```shell
37+
curl -LSfs "https://github.com/facebook/dotslash/releases/latest/download/dotslash-ubuntu-22.04.$(uname -m).tar.gz" | tar fxz - -C YOUR_BIN_PATH
38+
```
39+
40+
### macOS
41+
42+
For the reasons explained above, the macOS release is a Universal Binary.
43+
44+
```shell
45+
curl -LSfs https://github.com/facebook/dotslash/releases/latest/download/dotslash-macos.tar.gz | tar fxz - -C YOUR_BIN_PATH
46+
```
47+
3648
:::warning
3749

3850
Downloading the `.tar.gz` using a web browser instead of something like `curl`
@@ -45,6 +57,12 @@ xattr -r -d com.apple.quarantine ~/Downloads/dotslash-macos.*.tar.gz
4557

4658
:::
4759

60+
### Windows
61+
62+
```cmd
63+
cmd /c 'curl.exe -LSfs https://github.com/facebook/dotslash/releases/latest/download/dotslash-windows.tar.gz | tar fxz - -C YOUR_BIN_PATH'
64+
```
65+
4866
## GitHub Actions
4967

5068
We provide a GitHub Action to install dotslash for a workflow:

0 commit comments

Comments
 (0)