mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
update-scripts/update: write version-info during update
This commit is contained in:
parent
132c1611f6
commit
cd7a41c23c
1 changed files with 19 additions and 0 deletions
|
@ -41,12 +41,29 @@ writeShellApplication {
|
|||
fi
|
||||
}
|
||||
|
||||
versionInfo() {
|
||||
nix-build ./update-scripts -A version-info
|
||||
install -m 644 -T "$(realpath result)" ./version-info.toml
|
||||
if [ -n "$commit" ]; then
|
||||
git add version-info.toml
|
||||
git commit "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Initialise version-info.toml
|
||||
if [ ! -f version-info.toml ]; then
|
||||
echo "Creating version-info file"
|
||||
versionInfo -m "version-info: init"
|
||||
fi
|
||||
|
||||
# Update the root lockfile
|
||||
old=$(git show --no-patch --format=%h)
|
||||
echo "Updating root lockfile"
|
||||
nix flake update "''${update_args[@]}"
|
||||
new=$(git show --no-patch --format=%h)
|
||||
if [ "$old" != "$new" ]; then
|
||||
echo "Updating version-info"
|
||||
versionInfo --amend --no-edit
|
||||
writeGitHubOutput root_lock_body
|
||||
fi
|
||||
|
||||
|
@ -59,6 +76,8 @@ writeShellApplication {
|
|||
--flake './flake/dev'
|
||||
new=$(git show --no-patch --format=%h)
|
||||
if [ "$old" != "$new" ]; then
|
||||
echo "Updating version-info"
|
||||
versionInfo --amend --no-edit
|
||||
writeGitHubOutput dev_lock_body
|
||||
fi
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue