Skip to content

Commit fee60b6

Browse files
authored
Merge pull request #18 from dscho/pre-push-hook
Improve the pre-push hook
2 parents bd7aac8 + ef9ddfb commit fee60b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pre-push.hook

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ die 'The `pre-push` hook is not up to date with `pre-push.hook`'
1515
git diff --quiet dist/ ||
1616
die '`dist/` is dirty'
1717

18-
if test 'npm run build && npm run package' != "$(git show -s --format=%s HEAD)"
18+
base="$(git rev-list HEAD -1 -- dist/)"
19+
if test 0 -lt $(git rev-list --count ${base+$base..}HEAD -- \*.ts)
1920
then
2021
echo "Verifying that dist/ is up to date" >&2
2122
npm run build &&

0 commit comments

Comments
 (0)