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 17:03:52 UTC
[6/8] logging-log4cxx git commit: A new version in pom.xml needs to
be committed.
A new version in pom.xml needs to be committed.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/commit/2eeafe18
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/tree/2eeafe18
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/diff/2eeafe18
Branch: refs/heads/release_scripts
Commit: 2eeafe18ee5d104f94096e90ef461ebfcaaf7a02
Parents: 9592aff
Author: Thorsten Schöning <ts...@am-soft.de>
Authored: Thu Aug 17 18:32:22 2017 +0200
Committer: Thorsten Schöning <ts...@am-soft.de>
Committed: Thu Aug 17 18:32:22 2017 +0200
----------------------------------------------------------------------
release_prepare.sh | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/2eeafe18/release_prepare.sh
----------------------------------------------------------------------
diff --git a/release_prepare.sh b/release_prepare.sh
index 4e726db..7ec2d36 100755
--- a/release_prepare.sh
+++ b/release_prepare.sh
@@ -81,6 +81,14 @@ function co_next_stable
fi
}
+function git_commit_if
+{
+ if ! git diff-index --quiet HEAD
+ then
+ git commit -m "${1}"
+ fi
+}
+
function set_release_date_if
{
local today=$(date "+%Y-%m-%d")
@@ -161,6 +169,8 @@ function revert_mvn_prepare_new_dev_ver
local pom_new_ver="${new_dev_ver:-${pom_orig_ver}}"
sed -i -r "s/^(\t<version>).+(<)/\1${pom_new_ver}\2/" "pom.xml"
+ git add "pom.xml"
+ git_commit_if "Revert to ${pom_new_ver}."
}
function exec_mvn
@@ -225,12 +235,8 @@ END
git add "pom.xml"
git add "src/changes/changes.xml"
- if ! git diff-index --quiet HEAD
- then
- git commit -m "Prepare for next development iteration: ${new_dev_ver_short}"
- fi
-
- git checkout "next_stable"
+ git_commit_if "Prepare for next development iteration: ${new_dev_ver_short}"
+ git checkout "next_stable"
}
main