Created
June 13, 2022 09:13
-
-
Save syzer/491dc16e79e56c5e6358a8c52f5fcd6b to your computer and use it in GitHub Desktop.
Precommit hook to skip committing when CHANGELOG not updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#in .git/pre-commit | |
lint-staged | |
# CHANGELOG | |
if git status -s | grep -q "M CHANGELOG.md"; then | |
echo "# CHANGELOG Not updated." | |
exit 1 | |
else | |
echo "# CHANGELOG updated." | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment