Git Auto Increment tag
If you want GIT tag autoIncrement with one version number after each build you can use below shell script(./gittag.sh) as the hook. Scrip will find last committed TAG which starts with ENV_TAG_PREFIX ( QA_V) and creates next release TAG then push tag to GIT. VERSION_MODE [major|minor|revision|buildNumber - These are the possible value. each time one version is a tag with GIT. By default, buildNumber is pass which increment last digit in release tag like(x.x.x.1 to x.x.x.2). So if you want major release then you can pass major as option which tag GIT with major release like (1.x.x.x to 2.x.x.x)] e.g. ./gittag.sh major ./gittag.sh minor #!/bin/bash VERSION_MODE = $1 ENV_TAG_PREFIX = QA_V # "major": 1, # "minor": 0, # "revision": 0, # "buildNumber": 1 if [ "$VERSION_MODE" = "" ] ; then VERSION_MODE = "buildNumber" fi cd /path/to/your/git/checkout ...