Closed letto4135 closed 2 years ago
Answered my own question after a while of messing around.
"husky": {
"hooks": {
"post-commit": "commitmessage=`git log -1 --pretty=%B | grep -q -e fix -e feat; echo $?`; if [ $commitmessage == 0 ]; then npm run release patch; fi"
}
}
Making up a public changelog so there are certain things that I don't want shown like refactors and such, only show things that effect the user essentially.
Is there a way to use a post-commit hook to run standard-version only if there is a change that needs to be made to the changelog? Only other options I can see are manually running it, or bumping the version even when nothing will show in the changelog.