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/17 14:27:22 UTC

[14/17] logging-log4cxx git commit: Didn't extract version properly.

Didn't extract version properly.


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

Branch: refs/heads/release_scripts
Commit: 8c790d7a8764b51e20d419f31334e79bad31d2fa
Parents: 5e31719
Author: Thorsten Schöning <ts...@am-soft.de>
Authored: Thu Aug 17 15:38:42 2017 +0200
Committer: Thorsten Schöning <ts...@am-soft.de>
Committed: Thu Aug 17 15:40:17 2017 +0200

----------------------------------------------------------------------
 releasePrepare.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/8c790d7a/releasePrepare.sh
----------------------------------------------------------------------
diff --git a/releasePrepare.sh b/releasePrepare.sh
index d093776..0a06db3 100755
--- a/releasePrepare.sh
+++ b/releasePrepare.sh
@@ -45,7 +45,7 @@
 
 function main()
 {
-  exit_on_changes
+  #exit_on_changes
 
   branch_starting=$(      git branch | grep "\*" | cut -d " " -f 2)
   branch_starting_is_ns=$(git branch | grep "\* next_stable")
@@ -122,7 +122,8 @@ function update_scm_tag_name_format()
 
 function get_pom_curr_ver()
 {
-  echo "$(grep -E -e "^\t<version>" "pom.xml" | sed -r "s/<.+>(.+)<.+>/\1/")"
+  # \t doesn't seem to work for grep for some reason.
+  echo "$(grep -E -e "^\s<version>" "pom.xml" | sed -r "s/^\t<.+>(.+)<.+>/\1/")"
 }
 
 function get_mvn_prepare_new_dev_ver()
@@ -157,7 +158,7 @@ function revert_mvn_prepare_new_dev_ver_if()
     return 0
   fi
 
-  sed -i -r "s/(^\t<version>).+(<)/\1${new_dev_ver}\2/" "pom.xml"
+  sed -i -r "s/^(\t<version>).+(<)/\1${new_dev_ver}\2/" "pom.xml"
 }
 
 function exec_maven()
@@ -165,8 +166,8 @@ function exec_maven()
   local new_dev_ver=$(get_mvn_prepare_new_dev_ver)
   local prepare_args="-Dresume=false -DdevelopmentVersion=${new_dev_ver}"
 
-  mvn clean                             || exit 1
-  mvn release:prepare "${prepare_args}" || exit 1
+  mvn clean                           || exit 1
+  mvn release:prepare ${prepare_args} || exit 1
   revert_mvn_prepare_new_dev_ver_if "${new_dev_ver}"
 
   exit 1