File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,18 @@ die () {
9
9
exit 1
10
10
}
11
11
12
+ LF='
13
+ '
14
+
12
15
git diff --no-index --quiet pre-push.hook " $( git rev-parse --git-path hooks/pre-push) " ||
13
16
die ' The `pre-push` hook is not up to date with `pre-push.hook`'
14
17
15
18
# Verify that any tagged version is reflected in its `package.json`
16
19
for tag in $( git for-each-ref --format=' %(refname:short)' --points-at=HEAD ' refs/tags/v[0-9]*' )
17
20
do
21
+ out=" $( git tag --verify $tag 2>&1 ) " ||
22
+ die " $out$LF ${LF} Tag $tag is not signed/signature cannot be verified"
23
+
18
24
git grep -q ' "version": "' " ${tag# v} " ' "' refs/tags/$tag -- package.json || {
19
25
sed ' s/\("version": "\)[^"]*/\1' " ${tag# v} " / < package.json > package.json.new &&
20
26
mv -f package.json.new package.json
You can’t perform that action at this time.
0 commit comments