From 1f2fe99dc4baa689bf34cef8c85f105d5957db75 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Mon, 1 Jun 2009 18:27:27 +0000 Subject: Tweak SVNVersion be happier (matches windows). Fix about:version so "Developer build" says "Official build" when relevant, and lists SVN version for developer builds. BUG=12064 Review URL: http://codereview.chromium.org/118036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17337 0039d316-1c4b-4281-b951-d872f2087c98 --- build/mac/tweak_app_infoplist | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'build') diff --git a/build/mac/tweak_app_infoplist b/build/mac/tweak_app_infoplist index 1a2cc8d..845fc7e 100755 --- a/build/mac/tweak_app_infoplist +++ b/build/mac/tweak_app_infoplist @@ -65,12 +65,11 @@ set -x APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME) SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${APP_NAME}.app" -# Figure out what version this build corresponds to. Just use the svn revision -# for now. Warning: my svnversion returns 10495:10552M. But that's ok since -# it is just for reference. -SVN_REVISION=$(svnversion "${SRCROOT}") +# Visible in the about:version page. +SVN_REVISION=$(svn info "${SRCROOT}" | grep "Revision:" | cut -d" " -f2-) if [ -z "${SVN_REVISION}" ] ; then - echo "warning: could not determine svn revision" >&2 + echo "Could not determine svn revision. This may be OK." >&2 + # TODO: check for git, and get the version number from it? fi # Pull in the chrome version number @@ -94,8 +93,10 @@ TMP_INFO_PLIST="${TMP_INFO_PLIST_DEFAULTS}.plist" cp "${SRC_APP_PATH}/${INFO_PLIST_PATH}" "${TMP_INFO_PLIST}" # Save off the svn version number in case we need it -defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ +if [ ! -z "${SVN_REVISION}" ] ; then + defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ SVNRevision -string "${SVN_REVISION}" +fi # Add public version info so "Get Info" works defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ -- cgit v1.1