Files
ziti/apply-semver-tag.sh
T
Curt Tudor 7950bade6f ZT-450: setting up build-automation (#3)
* ZT-450: setting up build-automation
2019-12-04 10:07:29 -05:00

17 lines
474 B
Bash
Executable File

#!/bin/bash
#
# This script is invoked from the pre-bump-semver.sh script after a semver bump
# but before that bump is pushed back to the Git server.
#
MANIFEST="common/version/VERSION"
declare -x SCRIPTPATH="${0}"
FULLPATH=${SCRIPTPATH%/*}/$MANIFEST
if [ -f $FULLPATH ]
then
LINE=$(grep -o ${FULLPATH} -e '^[0]\.[0-9]*\.[0-9]*');
IFS='.' read -r -a array <<< "$LINE"
$(git tag -a ${array[0]}.${array[1]}.${array[2]} -m "${array[0]}.${array[1]}.${array[2]}")
fi;