build-java.sh edited online with Bitbucket
This commit is contained in:
parent
998d69ba48
commit
e73824ed09
@ -5,9 +5,13 @@ SERVICE_NAME=$1
|
||||
|
||||
if [[ "$bamboo_planRepository_branchName" == "master" ]]
|
||||
then
|
||||
echo "building on master branch"
|
||||
branchVersion=$(cat pom.xml | grep -Eo "<version>.*" | sed -s 's|<version>\(.*\)\..*\(-*.*\)</version>|\1|')
|
||||
echo "branch version is : $branchVersion"
|
||||
latestVersion=$(semver $( git tag -l $branchVersion.* ) | tail -n1)
|
||||
echo "latestVersion is : $latestVersion"
|
||||
newVersion="$(semver $latestVersion -p -i minor)"
|
||||
echo "newVersion is : $newVersion"
|
||||
elif [[ "$bamboo_planRepository_branchName" == release* ]]
|
||||
then
|
||||
branchVersion=$(echo $bamboo_planRepository_branchName | sed -s 's|release\/\([0-9]\+\.[0-9]\+\)\.x|\1|')
|
||||
@ -55,4 +59,4 @@ mvn --no-transfer-progress \
|
||||
|
||||
mvn --no-transfer-progress \
|
||||
-f ${bamboo_build_working_directory}/$SERVICE_NAME-image-v1/pom.xml \
|
||||
docker:push
|
||||
docker:push
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user