Skip to content

Commit 6f14b09

Browse files
committed
pre-push hook: adjust all _three_ locations of the version
When a new version is tagged, we need to take care not only of two locations, but of three... Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 3f87f76 commit 6f14b09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-push.hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ do
2828
echo 'warning: HEAD is not up to date with `origin/main`' >&2
2929

3030
regex="^ \"version\": \"$(echo "${tag#v}" | sed 's/\./\\./g')\",\$"
31-
substitute="s/^\\( \"version\": \"\\).*\",\$/\\1${tag#v}\",/"
31+
substitute="/\"name\": \"setup-git-for-windows-sdk\"/{N;s/\\(\"version\": \"\\).*\",\$/\\1${tag#v}\",/}"
3232
git grep -q "$regex" refs/tags/$tag -- package.json || {
3333
sed "$substitute" <package.json >package.json.new &&
3434
mv -f package.json.new package.json

0 commit comments

Comments
 (0)