fix multiversion issue
This commit is contained in:
parent
e855b9668e
commit
6f781008db
@ -6,12 +6,12 @@ SERVICE_NAME=$1
|
|||||||
if [[ "$bamboo_planRepository_branchName" == "master" ]]
|
if [[ "$bamboo_planRepository_branchName" == "master" ]]
|
||||||
then
|
then
|
||||||
branchVersion=$(cat pom.xml | grep -Eo "<version>.*" | sed -s 's|<version>\(.*\)\..*\(-*.*\)</version>|\1|')
|
branchVersion=$(cat pom.xml | grep -Eo "<version>.*" | sed -s 's|<version>\(.*\)\..*\(-*.*\)</version>|\1|')
|
||||||
latestVersion=$(git tag -l $branchVersion.* | tail -n1)
|
latestVersion=$( semver $(git tag -l $branchVersion.*) | tail -n1)
|
||||||
newVersion="$(semver $latestVersion -p -i minor)"
|
newVersion="$(semver $latestVersion -p -i minor)"
|
||||||
elif [[ "$bamboo_planRepository_branchName" == release* ]]
|
elif [[ "$bamboo_planRepository_branchName" == release* ]]
|
||||||
then
|
then
|
||||||
branchVersion=$(echo $bamboo_planRepository_branchName | sed -s 's|release\/\([0-9]\+\.[0-9]\+\)\.x|\1|')
|
branchVersion=$(echo $bamboo_planRepository_branchName | sed -s 's|release\/\([0-9]\+\.[0-9]\+\)\.x|\1|')
|
||||||
latestVersion=$(git tag -l $branchVersion.* | tail -n1)
|
latestVersion=$( semver $(git tag -l $branchVersion.*) | tail -n1)
|
||||||
newVersion="$(semver $latestVersion -p -i patch)"
|
newVersion="$(semver $latestVersion -p -i patch)"
|
||||||
elif [[ "${bamboo_version_tag}" != "dev" ]]
|
elif [[ "${bamboo_version_tag}" != "dev" ]]
|
||||||
then
|
then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user