Skip to content

Commit 0356d93

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 26d525a commit 0356d93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre-push.hook

+1-1
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\": \"get-azure-pipelines-artifact\"/{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)