1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
4 cd "$(dirname "${BASH_SOURCE[0]}")"
6 new_version
="$(curl -s "https
://api.github.com
/repos
/git-ecosystem
/git-credential-manager
/releases?per_page
=1" | jq -r '.[0].name' | sed 's|^GCM ||')"
7 old_version
="$(sed -nE 's/\s*version = "(.
*)".*/\1/p' ./default.nix)"
8 if [[ "$new_version" == "$old_version" ]]; then
14 update-source-version git-credential-manager
"$new_version"
15 $
(nix-build
-A git-credential-manager.fetch-deps
--no-out-link)