2025-03-06 16:01:52 -04:00
|
|
|
#!/usr/bin/env nix-shell
|
2025-03-10 01:43:30 -03:00
|
|
|
#!nix-shell -I nixpkgs=./. --pure -i bash -p bash nix nix-update git cacert common-updater-scripts
|
2025-03-06 16:01:52 -04:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
versionPrefix=$1
|
|
|
|
file=$2
|
2025-03-10 01:43:30 -03:00
|
|
|
attr=godotPackages_${versionPrefix/./_}
|
2025-03-06 16:01:52 -04:00
|
|
|
|
2025-03-10 01:43:30 -03:00
|
|
|
prev_version=$(nix eval --raw -f. "$attr".godot)
|
|
|
|
nix-update "$attr".godot \
|
2025-03-06 16:01:52 -04:00
|
|
|
--version-regex "($versionPrefix\\b.*-stable)" \
|
2025-03-11 16:36:31 +01:00
|
|
|
--override-filename "$2" \
|
|
|
|
--src-only
|
2025-03-10 01:43:30 -03:00
|
|
|
[[ $(nix eval --raw -f. "$attr".godot) != "$prev_version" ]] || exit 0
|
2025-03-06 16:01:52 -04:00
|
|
|
|
2025-03-10 01:43:30 -03:00
|
|
|
fetch_deps=$(nix build -f. "$attr".godot-mono.fetch-deps --print-out-paths --no-link)
|
|
|
|
"$fetch_deps"
|
2025-03-06 16:01:52 -04:00
|
|
|
|
2025-03-10 01:43:30 -03:00
|
|
|
update-source-version "$attr".godot.export-templates-bin --ignore-same-version --file="$file"
|
|
|
|
update-source-version "$attr".godot-mono.export-templates-bin --ignore-same-version --file="$file"
|