Skip to content

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.

License

Notifications You must be signed in to change notification settings

joaobsjunior/sh-conventional-commits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sh-conventional-commits

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.

Prerequisites

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.

Installing the hooks locally

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:

print command line

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. 🍾🎉

Automated version generation execution

  1. Copy file generateVersion.sh to your project
  2. To check what the next release version will be, execute the command inside your project folder:
bash generateVersion.sh
  1. 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

About

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages