1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/by-name/ng/ngrok/update.sh
Bob van der Linden a298a03ba6
ngrok: 3.10.1 -> 3.13.0 (#328897)
* ngrok: move to pkgs/by-name

* ngrok: support phase hooks

* ngrok: reuse lib.platforms.unix

* ngrok: format using nixfmt-rfc-style

* ngrok: add downloadPage and changelog

* ngrok: remove nested `with lib`

* ngrok: use xh instead of httpie for updateScript

Currently httpie cannot validate HTTPS certificate due to
https://github.com/NixOS/nixpkgs/issues/94666. xh is an alternative
where this problem does not exist.

* ngrok: 3.10.1 -> 3.13.0

* ngrok: format update.sh

* ngrok: use BASH_SOURCE in update.sh

* ngrok: strip on non-darwin systems
2024-07-22 10:29:32 -03:00

35 lines
848 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq xh
set -eu -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
get_download_info() {
xh --json \
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' \
>versions.json