I've just wrote a little command line tool to automate tags for semantic versioning in git.
You can see and download in the github repository, where you'll find full documentation.
versiontag looks for the last version tag in your project and updates it.
When you are ready for tagging, you only has to invoke
versiontag with the version level you want to update. And that's all. It would show you the current version, the new one, and will ask you for confirmation to add and to push it to the remote.
This is an example from the versioning of versiontag , in which you can see all steps and details:
➜ versiontag git:(master) ./versiontag patch 'Add License' Current version : v1.0.1 New tag : v1.0.2 Do you agree? ([y]es or [N]o): y Executing git tag -a v1.0.2 -m Add License (patch version) ... Tag v1.0.2 was created in local repository. Push it: git push origin v1.0.2 Delete tag: git tag -d v1.0.2 Do you want to push this tag right now? ([y]es or [N]o): y Executing git push origin v1.0.2 ... Counting objects: 1, done. Writing objects: 100% (1/1), 179 bytes | 179.00 KiB/s, done. Total 1 (delta 0), reused 0 (delta 0) To https://github.com/franiglesias/versiontag * [new tag] v1.0.2 -> v1.0.2
Ideas and improvements will be welcome (specially get the last version tag from the remote and discriminate tags that are not version related).