From 0bad03e6c1f88bf33398f15f009f56b112ec93bb Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Sun, 12 Apr 2015 05:08:46 +0000 Subject: [PATCH] #5925 no CFBundleVersion in Jenkins builds Work around version mismatch between java's and command-line's svns --- update-version-h.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/update-version-h.sh b/update-version-h.sh index ec0d42c5b..86697d809 100755 --- a/update-version-h.sh +++ b/update-version-h.sh @@ -20,9 +20,13 @@ peer_id_prefix=`grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_ major_version=`echo ${user_agent_prefix} | awk -F . '{print $1}'` minor_version=`echo ${user_agent_prefix} | awk -F . '{print $2 + 0}'` -# If this is a svn tree, and svnversion is available in PATH, use it to -# grab the version. -if [ -d ".svn" ] && type svnversion >/dev/null 2>&1; then +if [ -n "$JENKINS_URL" -a -n "$SVN_REVISION" ]; then + # Jenkins automated build, use the set environment variables to avoid + # version mismatches between java's svn and command line's svn + svn_revision=$SVN_REVISION +elif [ -d ".svn" ] && type svnversion >/dev/null 2>&1; then + # If this is a svn tree, and svnversion is available in PATH, use it to + # grab the version. svn_revision=`svnversion -n . | cut -d: -f1 | cut -dM -f1 | cut -dS -f1` else # Give up and check the source files