| # Tags the current git HEAD as a new version, passed via a flag. |
| GITILES_REPO_URL="https://gerrit.avm99963.com/plugins/gitiles/infinitegforums" |
| Usage: $progname --version VERSION |
| -v, --version the version of the new release (in the form vx) |
| which wants to be tagged. |
| -h, --help show this help message and exit |
| opts=$(getopt -l "help,version:" -o "hv:" -n "$progname" -- "$@") |
| prevVersion=$(git describe --abbrev=0) |
| if [[ $nextVersion == "null" ]]; then |
| echo "version parameter value is incorrect." >&2 |
| commitMessage1="$nextVersion" |
| commitMessage2="Changelog: $GITILES_REPO_URL/+log/refs/tags/$prevVersion..refs/tags/$nextVersion" |
| git tag -s $nextVersion -m "$commitMessage1" -m "$commitMessage2" |
| echo "Tag created. Now run \`git push --tags\` to push the tags to the server." |
| echo "Also, remember to sync the features to the TWPT-server." |
| echo "The tag could not be created." >&2 |