git: update.sh fix grep warning

This commit is contained in:
John Garcia 2024-06-14 12:28:31 +01:00
parent bbf2d4053a
commit 21db1640cd

View File

@ -4,7 +4,7 @@
set -eu -o pipefail
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')"
latestTag="$(git ls-remote --tags --sort="v:refname" https://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
latestTag="$(git ls-remote --tags --sort="v:refname" https://github.com/git/git.git | grep -v '{}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
targetVersion="${1:-$latestTag}"
if [ ! "${oldVersion}" = "${targetVersion}" ]; then