ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / games / osu-lazer / update.sh
blobdf1dbcc3c519a568b504a19a1d61f9f8677087c4
1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=../../../. -i bash -p curl jq common-updater-scripts
3 set -eo pipefail
4 cd "$(dirname "${BASH_SOURCE[0]}")"
6 deps_file="$(realpath "./deps.nix")"
8 new_version="$(curl -s "https://api.github.com/repos/ppy/osu/releases?per_page=1" | jq -r '.[0].name')"
9 old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
10 if [[ "$new_version" == "$old_version" ]]; then
11 echo "Up to date"
12 exit 0
15 cd ../../..
17 if [[ "$1" != "--deps-only" ]]; then
18 update-source-version osu-lazer "$new_version"
21 $(nix-build . -A osu-lazer.fetch-deps --no-out-link) "$deps_file"