Skip to content

Commit 02ea87c

Browse files
committed
Adding a variable to set the next development version on Bamboo
1 parent 2f906f0 commit 02ea87c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bamboo-specs/bamboo.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Release:
257257
set +x
258258
259259
export OMRS_VERSION=${bamboo.maven.release.version}
260+
export OMRS_DEV_VERSION=${maven.development.version}
260261
export IMAGE=${bamboo.docker.image.name}:${OMRS_VERSION}
261262
export DEV_IMAGE=${bamboo.docker.image.name}:${OMRS_VERSION}-dev
262263
export BUILD_IMAGE=${bamboo.docker.image.id}
@@ -299,8 +300,15 @@ Release:
299300
(
300301
echo "Updating the main branch to a new SNAPSHOT version"
301302
git push
303+
304+
echo "Setting the next development version"
305+
302306
docker run --rm -v m2-repo:/root/.m2/repository -v $(pwd):/openmrs_core \
303-
${DEV_IMAGE} mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false
307+
if [ -z "$OMRS_DEV_VERSION" ]; then
308+
${DEV_IMAGE} mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false
309+
else
310+
${DEV_IMAGE} mvn versions:set -DnewVersion=${OMRS_DEV_VERSION} -DgenerateBackupPoms=false
311+
fi
304312
305313
git commit -am "Setting new SNAPSHOT version"
306314
git push

0 commit comments

Comments
 (0)