Skip to content

Commit

Permalink
document on how to download release executables
Browse files Browse the repository at this point in the history
  • Loading branch information
bokwoon95 committed Apr 29, 2024
1 parent 8366b92 commit 4d4444c
Showing 1 changed file with 13 additions and 41 deletions.
54 changes: 13 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,10 @@

## Installation

**Go**
You can download binaries from [the release page](https://github.com/bokwoon95/wgo/releases/latest), or use the Go command:

```shell
go install github.com/bokwoon95/wgo@latest

```
**Linux**

```shell
# Intel/AMD
curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux"' | sed 's/^\s*"browser_download_url": "\|"$//g')"
chmod +x ./wgo
sudo mv ./wgo /usr/local/bin
```

```shell
# ARM
curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux-arm"' | sed 's/^\s*"browser_download_url": "\|"$//g')"
chmod +x ./wgo
sudo mv ./wgo /usr/local/bin
```

**macOS**

```shell
# Intel/AMD
curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux"' | sed 's/^\s*"browser_download_url": "\|"$//g')"
chmod +x ./wgo
sudo mv ./wgo /usr/local/bin
```

```shell
# Apple Silicon
curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux-apple-silicon"' | sed 's/^\s*"browser_download_url": "\|"$//g')"
chmod +x ./wgo
sudo mv ./wgo /usr/local/bin
```

**Windows**

NOTE: This only downloads the wgo.exe executable, you must move it into PATH yourself.

```powershell
Invoke-WebRequest -Uri $($(Invoke-RestMethod -Uri 'https://api.github.com/repos/bokwoon95/wgo/releases/latest').assets | Where-Object { $_.name -eq 'wgo-windows.exe' }).browser_download_url -OutFile wgo.exe
```

```text
Expand Down Expand Up @@ -353,3 +313,15 @@ Nothing! File watchers honestly all do the same things, if you find a file watch
## Contributing

See [START\_HERE.md](https://github.com/bokwoon95/wgo/blob/main/START_HERE.md).

## One-liner to download from releases

```shell
# macOS/Linux (replace wgo-macos-apple-silicon with wgo-macos | wgo-linux | wgo-linux-arm)
curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-macos-apple-silicon"' | sed 's/^\s*"browser_download_url": "\|"$//g')"
```

```powershell
# Windows
Invoke-WebRequest -OutFile wgo.exe -Uri $($(Invoke-RestMethod -Uri 'https://api.github.com/repos/bokwoon95/wgo/releases/latest').assets | Where-Object { $_.name -eq 'wgo-windows.exe' }).browser_download_url
```

0 comments on commit 4d4444c

Please sign in to comment.