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:
- git (https://git-scm.com/)
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. 🍾🎉
- Copy file
generateVersion.sh
to your project - To check what the next release version will be, execute the command inside your project folder:
bash generateVersion.sh
- To generate a new release version, creating a tag, execute the command with the parameter
true
(informs the script to generate a tag):
bash generateVersion.sh true