mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [3/3] incubator-mnemonic git commit: MNEMONIC-253: Fix prompt information for release.sh
Date Thu, 27 Apr 2017 23:26:05 GMT
MNEMONIC-253: Fix prompt information for release.sh


Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/b1c96dbe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/b1c96dbe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/b1c96dbe

Branch: refs/heads/master
Commit: b1c96dbe130642dd92e9cbc571254c527becffd9
Parents: f7eaea8
Author: Wang, Gang(Gary) <gang1.wang@intel.com>
Authored: Thu Apr 27 16:25:10 2017 -0700
Committer: Wang, Gang(Gary) <gang1.wang@intel.com>
Committed: Thu Apr 27 16:25:10 2017 -0700

----------------------------------------------------------------------
 build-tools/release.sh | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/b1c96dbe/build-tools/release.sh
----------------------------------------------------------------------
diff --git a/build-tools/release.sh b/build-tools/release.sh
index 116497c..07c3984 100755
--- a/build-tools/release.sh
+++ b/build-tools/release.sh
@@ -48,7 +48,7 @@ pushd "$MNEMONIC_HOME" || { echo "the environment variable \$MNEMONIC_HOME
conta
 RELEASE_VERSION="$1"
 NEXT_RELEASE_VERSION="$2"
 RELEASE_CANDIDATE_ID="$3"
-NEXT_VER_COMMIT_PREFIX="Bump version"
+IS_SAME_VERSION=false
 
 echo "You have specified:"
 echo "RELEASE_VERSION = ${RELEASE_VERSION}"
@@ -60,7 +60,8 @@ continueprompt
 git checkout master
 
 if [ "${RELEASE_VERSION}" == "${NEXT_RELEASE_VERSION}" ]; then
-    echo "You are trying to prepare a same version candidate so going to clean up existing
branch <branch-${RELEASE_VERSION}> and tag <v${RELEASE_VERSION}-incubating> if
any"
+    IS_SAME_VERSION=true
+    echo "You are trying to prepare a same version candidate so going to clean up existing
branch <branch-${RELEASE_VERSION}> and tag <v${RELEASE_VERSION}-incubating> if
exists"
     continueprompt
     git branch -d branch-${RELEASE_VERSION}
     if [ $? -ne 0 ]; then
@@ -71,7 +72,6 @@ if [ "${RELEASE_VERSION}" == "${NEXT_RELEASE_VERSION}" ]; then
     git push upstream --delete branch-${RELEASE_VERSION}
     git tag -d v${RELEASE_VERSION}-incubating
     git push upstream --delete v${RELEASE_VERSION}-incubating
-    NEXT_VER_COMMIT_PREFIX="Stay version"
 fi
 
 echo "Preparing to create a branch branch-${RELEASE_VERSION} for release"
@@ -82,7 +82,7 @@ git checkout -b branch-${RELEASE_VERSION} || { echo "Create branch failed";
exit
 mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${RELEASE_VERSION}-incubating
 git commit . -m "Prepare for releasing ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}"
 
-git tag -s v${RELEASE_VERSION}-incubating -m "Releasing ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}"
+git tag -s v${RELEASE_VERSION}-incubating -m "Release ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}"
 
 rm -rf target/
 git clean -xdf
@@ -129,8 +129,16 @@ continueprompt
 
 git checkout master
 git merge --no-ff branch-${RELEASE_VERSION}
-mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT
-git commit . -m "${NEXT_VER_COMMIT_PREFIX} to ${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT"
+
+if [ "$IS_SAME_VERSION" = true ]; then
+  NEXT_RELEASE_VERSION_POM="${RELEASE_VERSION}-incubating-SNAPSHOT"
+  NEXT_RELEASE_VERSION_COMMIT="Version ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}"
+else
+  NEXT_RELEASE_VERSION_POM="${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT"
+  NEXT_RELEASE_VERSION_COMMIT="Bump version to ${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT"
+fi
+mvn versions:set -DgenerateBackupPoms=false -DnewVersion="${NEXT_RELEASE_VERSION_POM}"
+git commit . -m "${NEXT_RELEASE_VERSION_COMMIT}"
 
 echo "Push release merge and new version to upstream."
 continueprompt


Mime
View raw message