summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2019-01-07 15:29:18 -0500
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-01-07 15:46:37 -0500
commit0d2d7360df46a4baad1ef553a5248677c7a0d542 (patch)
treec4a0770fb94244bc95e44247af717de3beb8103c /tools
parent38d2d6a121d00d49d989cabf7ec5844625ed4ffe (diff)
Prepare for release build1.2.0
Create release build of CCSDK Dublin on ODL Oxygen prior to merging Fluorine changes Change-Id: I3fcac4a390712a30d2e51eda63a835a6bdf5055c Issue-ID: CCSDK-861 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/updParentVersion.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/updParentVersion.sh b/tools/updParentVersion.sh
new file mode 100755
index 00000000..8740a89c
--- /dev/null
+++ b/tools/updParentVersion.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+updatePom() {
+cat $1 | xsltproc -o $1 /tmp/rebase-pom.xslt -
+}
+
+export -f updatePom
+
+# Create XSLT script
+newVersion=$2
+echo "newVersion is $newVersion"
+cat <<END > /tmp/rebase-pom.xslt
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:pom="http://maven.apache.org/POM/4.0.0"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ exclude-result-prefixes="pom">
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+
+ <!-- Copy everything that does not match a rewrite rule -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Change ccsdk parent pom version -->
+ <xsl:template match="//pom:parent[pom:groupId='org.onap.ccsdk.parent']/pom:version">
+ <version>$newVersion</version>
+ </xsl:template>
+</xsl:stylesheet>
+END
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: $0 <directory> <version>"
+ exit 1
+fi
+
+find $1 -name pom.xml -exec bash -c 'updatePom "$0" $1' '{}' \;