Skip to content

Commit

Permalink
Adding a variable to set the next development version on Bamboo
Browse files Browse the repository at this point in the history
  • Loading branch information
wikumChamith committed Nov 11, 2024
1 parent 2f906f0 commit 4228304
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bamboo-specs/bamboo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ Release:
set +x
export OMRS_VERSION=${bamboo.maven.release.version}
export NEW_DEV_VERSION=${maven.development.version}
export IMAGE=${bamboo.docker.image.name}:${OMRS_VERSION}
export DEV_IMAGE=${bamboo.docker.image.name}:${OMRS_VERSION}-dev
export BUILD_IMAGE=${bamboo.docker.image.id}
Expand Down Expand Up @@ -299,8 +300,16 @@ Release:
(
echo "Updating the main branch to a new SNAPSHOT version"
git push
docker run --rm -v m2-repo:/root/.m2/repository -v $(pwd):/openmrs_core \
${DEV_IMAGE} mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false
echo "Setting the next development version"
if [ -z "$NEW_DEV_VERSION" ]; then
docker run --rm -v m2-repo:/root/.m2/repository -v $(pwd):/openmrs_core \
${DEV_IMAGE} mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false
else
docker run --rm -v m2-repo:/root/.m2/repository -v $(pwd):/openmrs_core \
${DEV_IMAGE} mvn versions:set -DnewVersion=${NEW_DEV_VERSION} -DgenerateBackupPoms=false
fi
git commit -am "Setting new SNAPSHOT version"
git push
Expand Down

0 comments on commit 4228304

Please sign in to comment.