1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq common-updater-scripts
4 cd "$(dirname "${BASH_SOURCE[0]}")"
6 new_version
="$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s "https
://api.github.com
/repos
/JustArchiNET
/ArchiSteamFarm
/releases
" | jq -r 'map(select(.prerelease == false)) | .[0].tag_name')"
7 old_version
="$(sed -nE 's/\s*version = "(.
*)".*/\1/p' ./default.nix)"
9 if [[ "$new_version" == "$old_version" ]]; then
10 echo "Already up to date!"
11 if [[ "${1-default}" != "--deps-only" ]]; then
19 if [[ "${1:-}" != "--deps-only" ]]; then
20 update-source-version ArchiSteamFarm
"$new_version"
23 $
(nix-build
-A ArchiSteamFarm.fetch-deps
--no-out-link)