Repository: oozie
Updated Branches:
  refs/heads/master eeb4529df -> 1f103db6c


OOZIE-3210 [build] Revision information is empty (asalamon74 via andras.piros)


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/1f103db6
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/1f103db6
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/1f103db6

Branch: refs/heads/master
Commit: 1f103db6c5caa2cf8034e4138439344bf0d8d2e1
Parents: eeb4529
Author: Andras Piros <andras.pi...@cloudera.com>
Authored: Wed Aug 29 16:33:07 2018 +0200
Committer: Andras Piros <andras.pi...@cloudera.com>
Committed: Wed Aug 29 16:33:07 2018 +0200

----------------------------------------------------------------------
 bin/create-release-artifact | 19 ++++++++++++++++++-
 release-log.txt             |  1 +
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/1f103db6/bin/create-release-artifact
----------------------------------------------------------------------
diff --git a/bin/create-release-artifact b/bin/create-release-artifact
index 86d4d5d..e339382 100755
--- a/bin/create-release-artifact
+++ b/bin/create-release-artifact
@@ -27,6 +27,18 @@ run() {
   fi
 }
 
+update_buildinfo() {
+  if [ "${VC_REV}" != "" ]; then
+    BUILDINFO_DIR=client/src/main/resources
+    
BUILDINFO_FILE="oozie-${releaseVersion}/${BUILDINFO_DIR}/oozie-buildinfo.properties"
+    VC_REV_ESC=$(echo "${VC_REV}" | sed -e 's/[\/&]/\\&/g')
+    VC_URL_ESC=$(echo "${VC_URL}" | sed -e 's/[\/&]/\\&/g')
+    run sed -i .bak "s/\${vc.revision}/${VC_REV_ESC}/g" "${BUILDINFO_FILE}"
+    run sed -i .bak "s/\${vc.url}/${VC_URL_ESC}/g" "${BUILDINFO_FILE}"
+    run rm "${BUILDINFO_FILE}.bak"
+  fi
+}
+
 branchUrl=$(git ls-remote --get-url)
 
 branchName=$(git rev-parse --abbrev-ref HEAD)
@@ -41,11 +53,14 @@ run git clone "$branchUrl" -b "$branchName" oozie-src
 
 run cd oozie-src
 
+VC_REV=$(git branch -v | awk '/^\*/ {printf("%s@%s\n", $2, $3); }')
+VC_URL=$(git remote -v | grep origin | grep fetch | awk '{print $2}')
+
 rm -rf .git
 
 releaseVersion=$(xmllint --xpath 
"//*[local-name()='project']/*[local-name()='version']/text()" pom.xml)
 
-if [ "$releaseVersion}" = "" ]; then
+if [ "${releaseVersion}" == "" ]; then
   echo "Could not determine branch version from POM"
   exit 1
 fi
@@ -54,6 +69,8 @@ run cd ..
 
 run mv oozie-src "oozie-$releaseVersion"
 
+update_buildinfo
+
 run tar czf "oozie-${releaseVersion}.tar.gz" "oozie-$releaseVersion"
 
 run cp "oozie-$releaseVersion/release-log.txt" .

http://git-wip-us.apache.org/repos/asf/oozie/blob/1f103db6/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index ad517e3..6f8b8fa 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.1.0 release (trunk - unreleased)
 
+OOZIE-3210 [build] Revision information is empty (asalamon74 via andras.piros)
 OOZIE-2684 Bad database schema error for WF_ACTIONS table (abhishekbafna, 
kmarton via andras.piros)
 OOZIE-3332 [examples] Spark examples should feature yarn client and cluster 
modes (daniel.becker via andras.piros)
 OOZIE-3318 [build] Fix Javadoc check in the pre-commit (kmarton via 
andras.piros)

Reply via email to