summaryrefslogtreecommitdiffstats
path: root/dcae-demo-controller/set-versions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-demo-controller/set-versions.sh')
-rw-r--r--dcae-demo-controller/set-versions.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/dcae-demo-controller/set-versions.sh b/dcae-demo-controller/set-versions.sh
new file mode 100644
index 0000000..4f785c4
--- /dev/null
+++ b/dcae-demo-controller/set-versions.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+#set -e
+#set -v
+
+## go to location with clone GIT repositories
+cd $(dirname $(dirname $(dirname $0)))
+
+VERSION=$1
+
+
+
+## handle POM files with no parent
+for file in $(find dcae-* -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
+
+## handle complete build pom
+FILE=dcae-org.openecomp.dcae.controller/pom-complete-build.xml
+sed -i "sX<version>.*</version><!--VERSION-->X<version>$VERSION</version><!--VERSION-->X" $FILE
+