Automatically create git tags if the last commit was a GitHub merge
npm install taggerIf the last commit in your repo is "Merge pull request #121 from myUser/major/changes"
running tagger will bump the major tag number for your project vianpm version using magic to determine what sort of change your PR contained.
tagger looks in your repo for the last commit. If it's a merge from GitHub,npm version [major, minor, or patch]__[type of change]__/[name of feature branch]
So, given that, we look at __[type of change]__ and find the change type from
the following table:
Prefix | Type of change
-------- | ---------------
feature | major
major | major
task | minor
chore | minor
minor | minor
Anything else is considered a patch change
Basically, our post-test step in Jenkins looks like:
`` shell``
if [[ $test_passed && $branch == 'master' ]]; then
tagger && git push --tags
fi