Drop RELEASE_TAG from Nitrogen onwards 04/61004/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 1 Aug 2017 19:58:45 +0000 (15:58 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 1 Aug 2017 20:25:14 +0000 (16:25 -0400)
Change-Id: I5547e0c4cb77ee80e34cbfce8e848d384b3ccae9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/include-raw-autorelease-release-versions.sh
jjb/autorelease/version-bump.sh

index bb50bec4170fb9fc897d975209ea113c60d01617..dbf2e287f5730e151ced66e0b09098e5f6ca45ea 100644 (file)
@@ -21,7 +21,17 @@ RELEASE_TAG="${RELEASE_TAG^}"
 PATCH_DIR="$WORKSPACE/patches"
 
 echo "$RELEASE_TAG"
-lftools version release "$RELEASE_TAG"
+# Remove this case statement when Carbon is no longer supported.
+# Nitrogen onwards we do not want to use the release tag so simply need to
+# strip xml files of -SNAPSHOT tags.
+case "$RELEASE_TAG" in
+    Boron*|Carbon*)
+        lftools version release "$RELEASE_TAG"
+        ;;
+    *)
+        find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//'
+        ;;
+esac
 git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true"
 git commit -am "Release $RELEASE_TAG"
 
index c0d70af2c9f41540d7e8515aebfc4851612c986d..bc68b8b75114badd1805bbf15723df6569aa4f61 100644 (file)
 # This script performs version bumping activities for an ODL release.
 echo "---> version-bump.sh"
 
-# Set release tag as $STREAM, when no release tag is passed
-RELEASE_TAG="${RELEASE_TAG:-${STREAM^}}"
-# Ensure that the first letter of RELEASE_TAG is uppercase.
-RELEASE_TAG="${RELEASE_TAG^}"
+# The only purpose of RELEASE_TAG in this script is to set the Gerrit topic.
+# It is also used as a placeholder for version bumping but gets wiped out
+# immediately to bump versions by x.y.(z+1).
+RELEASE_TAG="${STREAM^}"
 
 mkdir -p "$WORKSPACE/archives"
 LOG_FILE="$WORKSPACE/archives/version-bump.log"