Skip to content

Commit

Permalink
pre-push: also verify the version in package-lock.json
Browse files Browse the repository at this point in the history
We already verify it in `package.json`.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Jan 14, 2022
1 parent d9691ac commit 3049866
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pre-push.hook
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ do
git grep -q "$regex" refs/tags/$tag -- package.json || {
sed "$substitute" <package.json >package.json.new &&
mv -f package.json.new package.json
sed "$substitute" <package-lock.json >package-lock.json.new &&
mv -f package-lock.json.new package-lock.json
die "package.json did not reflect $tag; It was adjusted."
exit 1
}

git grep -q "$regex" refs/tags/$tag -- package-lock.json || {
sed "$substitute" <package-lock.json >package-lock.json.new &&
mv -f package-lock.json.new package-lock.json
die "package-lock.json did not reflect $tag; It was adjusted."
exit 1
}
done

git diff --quiet dist/ ||
Expand Down

0 comments on commit 3049866

Please sign in to comment.