evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / po / pomerium / updater.sh
blob0df47268ca9657bd606340ab49151decbaaec4a5
1 #! /usr/bin/env nix-shell
2 #! nix-shell -i bash -p gnugrep coreutils curl wget jq nix-update prefetch-yarn-deps
4 set -euo pipefail
5 pushd "$(dirname "${BASH_SOURCE[0]}")"
7 owner="pomerium"
8 repo="pomerium"
9 version=`curl -s "https://api.github.com/repos/$owner/$repo/tags" | jq -r .[0].name | grep -oP "^v\K.*"`
10 url="https://raw.githubusercontent.com/$owner/$repo/v$version/"
12 if [[ "$UPDATE_NIX_OLD_VERSION" == "$version" ]]; then
13 echo "Already up to date!"
14 exit 0
17 rm -f package.json yarn.lock
18 wget "$url/ui/yarn.lock" "$url/ui/package.json"
19 echo $(prefetch-yarn-deps) > yarn-hash
20 rm -f yarn.lock
22 popd
23 nix-update pomerium --version $version