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/07/09 23:12:44 UTC

[08/23] logging-log4cxx git commit: Improved release:prepare

Improved release:prepare


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

Branch: refs/heads/master
Commit: 2c155a4e52e8d9d97ce3e663def01894b0f21dc7
Parents: 757cf04
Author: Thorsten Schöning <ts...@am-soft.de>
Authored: Mon Jul 10 00:42:15 2017 +0200
Committer: Thorsten Schöning <ts...@am-soft.de>
Committed: Mon Jul 10 00:42:15 2017 +0200

----------------------------------------------------------------------
 releasePerfom.sh  | 20 ++++++++++++++++++--
 releasePrepare.sh | 26 +++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/2c155a4e/releasePerfom.sh
----------------------------------------------------------------------
diff --git a/releasePerfom.sh b/releasePerfom.sh
index 8b3f682..ef7a65b 100755
--- a/releasePerfom.sh
+++ b/releasePerfom.sh
@@ -1,4 +1,4 @@
-#! /bin/sh -e
+#! /bin/bash -e
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -17,12 +17,28 @@
 # Sign release artifacts until a better solution is available.
 #
 
+# Dependencies might be available in a special relative dir struct for the
+# build and if so, that struct needs to be available for the release build as
+# well.
+mkdir -p target/checkout
+pushd target > /dev/null
+if [ -d "../../apr" ] && [ ! -d "apr" ]
+then
+  ln -s "../../apr" "apr"
+fi
+if [ -d "../../apr-util" ] && [ ! -d "apr-util" ]
+then
+  ln -s "../../apr-util" "apr-util"
+fi
+
+mvn release:perform
+
 # Might be a good idea to have another look at the GBG plugin for Maven in the
 # future:
 #
 # http://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/
 # http://maven.apache.org/plugins/maven-gpg-plugin/
-pushd target/checkout/target
+pushd target
 for file in *.tar.gz *.zip
 do
   echo "Processing ${file}:"

http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/2c155a4e/releasePrepare.sh
----------------------------------------------------------------------
diff --git a/releasePrepare.sh b/releasePrepare.sh
index 343b3e9..b4bdc2d 100755
--- a/releasePrepare.sh
+++ b/releasePrepare.sh
@@ -1,4 +1,4 @@
-#! /bin/sh -e
+#! /bin/bash -e
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -17,5 +17,29 @@
 # Prepare a release.
 #
 
+TODAY=$(date "+%Y-%m-%d")
+sed -i -r "s/date=\"XXXX-XX-XX\"/date=\"${TODAY}\"/" "src/changes/changes.xml"
+git add "src/changes/changes.xml"
+git commit -m "Set release date to today."
+
 mvn clean
 mvn release:prepare -Dresume=false
+
+# Propagate new version in some additional files:
+NEW_DEV_VER_SHORT=$(grep -E "^project.dev.log4cxx" "release.properties" | cut -d = -f 2 | cut -d - -f 1)
+NEW_RELEASE=$(cat <<-"END"
+	<body>\n\
+		<release	version="VER_NEEDED"\n\
+					date="XXXX-XX-XX"\n\
+					description="Maintenance release">\n\
+		<\/release>\n
+END
+)
+NEW_RELEASE="${NEW_RELEASE/VER_NEEDED/${NEW_DEV_VER_SHORT}}"
+
+sed -i -r "s/AC_INIT\(\[log4cxx\], \[.+?\]\)/AC_INIT([log4cxx], [${NEW_DEV_VER_SHORT}])/" "configure.ac"
+sed -i -r "s/<body>/${NEW_RELEASE}/" "src/changes/changes.xml"
+
+git add "configure.ac"
+git add "src/changes/changes.xml"
+git commit -m "prepare for next development iteration: ${NEW_DEV_VER_SHORT}"