A hook that locally validates commit messages, checking if they follow the conventional commit pattern. The project also includes a shell script for generating semantic versions through conventional commits.
Your computer must have the following technology(s) installed:
[!IMPORTANT] If you are using Windows as your operating system, you must run all commands through the "git bash" application.
If you wish to install the hook on your machine, run the following script inside this project folder:
chmod +x commit-msg
bash setup.sh
To verify if it was installed correctly, execute the command:
git config --global --list | grep .git-template && ls $HOME/.git-template/hooks/
Check if the lines with the keys core.hookspath
and init.templatedir
are displayed.
See the image below for an example of the expected response:
Great! You now have the hook installed on your machine and from now on, all your commits will be validated to see if they follow conventional commits. 🍾🎉
generateVersion.sh
to your projectbash generateVersion.sh
true
(informs the script to generate a tag):
bash generateVersion.sh true