3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/ngrok/update.sh
Billy J Rhoades II 8e97f29c01 ngrok: 2.3.40 -> 3.0.4
ngrok 3 was released this morning. Changelog from v2 is here:

https://ngrok.com/docs/ngrok-agent/changelog

And a detailed upgrade guide is here:

https://ngrok.com/docs/guides/upgrade-v2-v3

Notably, arguments must now be double hyphens: `--token`. Previously,
single hyphens were accepted but those invocations will now error.
2022-06-13 14:53:58 -07:00

35 lines
875 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -p httpie
#!nix-shell -p jq
#!nix-shell -i bash
set -eu -o pipefail
get_download_info() {
http --body \
https://update.equinox.io/check \
'Accept:application/json; q=1; version=1; charset=utf-8' \
'Content-Type:application/json; charset=utf-8' \
app_id=app_c3U4eZcDbjV \
channel=stable \
os=$1 \
goarm= \
arch=$2 \
| jq --arg sys "$1-$2" '{
sys: $sys,
url: .download_url,
sha256: .checksum,
version: .release.version
}'
}
(
get_download_info linux 386
get_download_info linux amd64
get_download_info linux arm
get_download_info linux arm64
get_download_info darwin amd64
get_download_info darwin arm64
) | jq --slurp 'map ({ (.sys): . }) | add' \
> pkgs/tools/networking/ngrok/versions.json