Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / blockchains / bisq-desktop / update.sh
blobc65e04e3de409138f02bf298d80be867660d8c96
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl jq gnused gnupg common-updater-scripts
4 set -eu -o pipefail
6 version="$(curl -s https://api.github.com/repos/bisq-network/bisq/releases| jq '.[] | {name,prerelease} | select(.prerelease==false) | limit(1;.[])' | sed 's/[\"v]//g' | head -n 1)"
7 depname="Bisq-64bit-$version.deb"
8 src="https://github.com/bisq-network/bisq/releases/download/v$version/$depname"
9 signature="$src.asc"
11 pushd $(mktemp -d --suffix=-bisq-updater)
12 export GNUPGHOME=$PWD/gnupg
13 mkdir -m 700 -p "$GNUPGHOME"
14 curl -L -o "$depname" -- "$src"
15 curl -L -o signature.asc -- "$signature"
16 curl https://bisq.network/pubkey/E222AA02.asc | gpg --import
17 gpg --batch --verify signature.asc "$depname"
18 sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$depname")
19 popd
21 update-source-version bisq-desktop "$version" "$sha256"