#!/bin/sh

targetversion=$1
snapshotversion="$targetversion-SNAPSHOT"

# Add validater here.

echo "============ Hotfix branch generator ===============\n"

echo "Current branch is \n$(git branch -v)"
echo "Updating pom version numbers to $targetversion"

git checkout master
git flow hotfix start $targetversion
mvn versions:set -DnewVersion=$snapshotversion
mvn -N versions:update-child-modules
mvn versions:commit

echo "Done! Do not forget to commit & push the changes."

Test script to create new hotfix branch had been added.
Test script to create new hotfix branch had been added.

Change-Id: Ic6065355cd4edbd6001580ec5e2d6cd26b0de3fc
