1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p curl gnused nix
6 if [ $# -gt 0 ] && [ "$1" = "unstable" ]; then
7 ATTR
="lilypond-unstable"
8 FILE
="$(dirname "${BASH_SOURCE[@]}")/unstable.nix"
12 FILE
="$(dirname "${BASH_SOURCE[@]}")/default.nix"
13 QUERY
="VERSION_STABLE="
17 PREV
=$
(nix
eval --raw -f default.nix
$ATTR.version
)
18 NEXT
=$
(curl
-s 'https://gitlab.com/lilypond/lilypond/-/raw/master/VERSION' |
grep "$QUERY" | cut
-d= -f2)
19 sed -i "s|$PREV|$NEXT|" "$FILE"
20 echo "[{\"commitMessage\":\"$ATTR: $PREV -> $NEXT\"}]"
23 PREV
=$
(nix
eval --raw -f default.nix
$ATTR.src.outputHash
)
24 NEXT
=$
(nix
hash to-sri
--type sha256 $
(nix-prefetch-url
--type sha256 $
(nix
eval --raw -f default.nix
$ATTR.src.url
)))
25 sed -i "s|$PREV|$NEXT|" "$FILE"