You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ts...@apache.org on 2017/08/16 14:17:04 UTC

[16/29] logging-log4cxx git commit: If on next_stable, we don't need to change any files anymore after calls to Maven, else we do. Additionally, the commit for the current date only needs to get merged if we did not start in next_stable, else we don't kn

If on next_stable, we don't need to change any files anymore after calls to Maven, else we do. Additionally, the commit for the current date only needs to get merged if we did not start in next_stable, else we don't know where to merge the new date.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/commit/9693b9e0
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/tree/9693b9e0
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/diff/9693b9e0

Branch: refs/heads/next_stable
Commit: 9693b9e0feadac8c04398266af9dd0dcc47b28d4
Parents: 0fd27be
Author: Thorsten Schöning <ts...@am-soft.de>
Authored: Wed Aug 16 10:57:51 2017 +0200
Committer: Thorsten Schöning <ts...@am-soft.de>
Committed: Wed Aug 16 10:57:51 2017 +0200

----------------------------------------------------------------------
 releasePrepare.sh | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/9693b9e0/releasePrepare.sh
----------------------------------------------------------------------
diff --git a/releasePrepare.sh b/releasePrepare.sh
index bdd2a89..c2ad1f8 100755
--- a/releasePrepare.sh
+++ b/releasePrepare.sh
@@ -29,8 +29,8 @@ then
   exit 1
 fi
 
-branch_starting=$(         git branch | grep "\*" | cut -d " " -f 2)
-branch_starting_is_ns=$(   git branch | grep "\* next_stable")
+branch_starting=$(      git branch | grep "\*" | cut -d " " -f 2)
+branch_starting_is_ns=$(git branch | grep "\* next_stable")
 
 if [ -z "${branch_starting_is_ns}" ]
 then
@@ -44,10 +44,13 @@ git add "src/changes/changes.xml"
 if ! git diff-index --quiet HEAD
 then
   git commit -m "Set release date to today."
-  commit_changes=$(git log --max-count=1 | grep "commit" | cut -d " " -f 2)
-  git checkout "${branch_starting}"
-  git merge    "${commit_changes}"
-  git checkout "next_stable"
+  if [ -z "${branch_starting_is_ns}" ]
+  then
+    commit_changes=$(git log --max-count=1 | grep "commit" | cut -d " " -f 2)
+    git checkout "${branch_starting}"
+    git merge    "${commit_changes}"
+    git checkout "next_stable"
+  fi
 fi
 
 #mvn clean                          || exit 1
@@ -55,13 +58,15 @@ fi
 
 if [ -n "${branch_starting_is_ns}" ]
 then
-  git checkout "${branch_starting}"
-  new_release_cycle=$(grep 'date="XXXX-XX-XX"' "src/changes/changes.xml")
-  if [ -n "${new_release_cycle}" ]
-  then
-    git checkout "next_stable"
-    exit 0
-  fi
+  exit 0
+fi
+
+git checkout "${branch_starting}"
+new_release_cycle=$(grep 'date="XXXX-XX-XX"' "src/changes/changes.xml")
+if [ -n "${new_release_cycle}" ]
+then
+  git checkout "next_stable"
+  exit 0
 fi
 
 # Propagate new version into some additional files: