Skip to content

Commit

Permalink
added pre-commit hook to ensure changelog was updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellpeck committed Feb 4, 2024
1 parent 3e76364 commit 08d7af2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
git lfs pre-push "$@"

if ! git status -s | grep -q "M Changelog.md"; then
echo "The changelog was not updated. Please document your changes in Changelog.md before pushing."
exit 1
fi

0 comments on commit 08d7af2

Please sign in to comment.