diff options
author | Carsten Lund <lund@research.att.com> | 2017-02-23 18:23:07 +0000 |
---|---|---|
committer | Carsten Lund <lund@research.att.com> | 2017-02-23 19:55:08 +0000 |
commit | 2d06a696da443028244c453d45466310e9953fa1 (patch) | |
tree | 668a4db02348cb3d3d2c486e8a42032a44317717 /jjb/include-update-pom-versions.sh | |
parent | b23ba04d4fad6eae787a4a22798b7e69806f8045 (diff) |
Added new template for java release jobs.
Change-Id: I995dc629a24253cf4dfd97858462254db90ca684
Signed-off-by: Carsten Lund <lund@research.att.com>
Diffstat (limited to 'jjb/include-update-pom-versions.sh')
-rw-r--r-- | jjb/include-update-pom-versions.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/jjb/include-update-pom-versions.sh b/jjb/include-update-pom-versions.sh new file mode 100644 index 000000000..0e269a2af --- /dev/null +++ b/jjb/include-update-pom-versions.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +## Will update POM in workspace with release version + +if [ ! -e version.properties ]; then + echo "Missing version.properties" + exit 1 +fi + +## will setup variable release_version +source ./version.properties + +VERSION=$release_version + +## handle POM files with no parent +for file in $(find . -name pom.xml); do + if [ "$(grep -c '<parent>' $file)" == "0" ]; then + ( + cd $(dirname $file) + ${MVN} versions:set versions:commit \ + -DnewVersion=$VERSION \ + -DprocessDependencies=false + ) + fi +done + +find . -name pom.xml.versionsBackup -delete + |