summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2019-07-01 13:08:58 -0400
committerDan Timoney <dtimoney@att.com>2019-08-14 19:04:08 +0000
commit135e40799545c6cb73a8854340d7eefaaa68b67e (patch)
tree8a75eab9c7b5fcd8b8fc04d22275f5d74fa78c69 /tools
parent3388100268069761b5cd13e9af0beb01a9f0c2c5 (diff)
Update parent poms for ODL Neon
Update third party package versions to align with ODL Neon SR1. Change-Id: I82da85e6a9581726267be0f9cd64c4eb193ceda3 Issue-ID: CCSDK-1389 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/changeVersion.sh20
-rwxr-xr-xtools/fluorine2neon.sh47
2 files changed, 67 insertions, 0 deletions
diff --git a/tools/changeVersion.sh b/tools/changeVersion.sh
new file mode 100755
index 00000000..144ca539
--- /dev/null
+++ b/tools/changeVersion.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: $0 new-version"
+ exit 1
+fi
+
+
+mvn versions:set versions:update-child-modules versions:commit -B -DnewVersion=$1
+
+base_version=$(echo $1 | cut -d- -f1)
+major=$(echo $base_version | cut -d. -f1)
+minor=$(echo $base_version | cut -d. -f2)
+patch=$(echo $base_version | cut -d. -f3)
+
+if [ -f version.properties ]
+then
+ sed -i '' -e 's/\(release_name=\).*/\1'$major'/;s/\(sprint_number=\).*/\1'$minor'/;s/\(feature_revision=\).*/\1'$patch'/' version.properties
+fi
diff --git a/tools/fluorine2neon.sh b/tools/fluorine2neon.sh
new file mode 100755
index 00000000..4a513435
--- /dev/null
+++ b/tools/fluorine2neon.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+updatePom() {
+export XMLLINT_INDENT=" "
+cat $1 | xsltproc -o $1 /tmp/rebase-pom.xslt -
+}
+
+export -f updatePom
+
+# Copy blueprints to new directory structure
+find . -path '*/src/main/resources/org/opendaylight/blueprint/*.xml' -execdir sh -c "mkdir -p ../../../OSGI-INF/blueprint; cp {} ../../../OSGI-INF/blueprint" \;
+
+# Update ietf-net-types dependencies
+
+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">
+
+ <!-- Copy everything that does not match a rewrite rule -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="//pom:dependency[pom:groupId='org.opendaylight.mdsal.model' and pom:artifactId='ietf-inet-types-2013-07-15']">
+ <dependency><xsl:text>&#xa; </xsl:text>
+ <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId><xsl:text>&#xa; </xsl:text>
+ <artifactId>rfc6991</artifactId><xsl:text>&#xa; </xsl:text>
+ </dependency><xsl:text>&#xa;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="//pom:dependency[pom:groupId='org.opendaylight.mdsal.model' and pom:artifactId='ietf-yang-types-20130715']">
+ </xsl:template>
+
+ <xsl:template match="//pom:dependency[pom:groupId='org.opendaylight.mdsal.model' and pom:artifactId='mdsal-model-artifacts']">
+ </xsl:template>
+
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+</xsl:stylesheet>
+END
+
+find . -name pom.xml -exec bash -c 'updatePom "$0" .' '{}' \;