Re: SVN revision number in CFBundleVersion
Re: SVN revision number in CFBundleVersion
- Subject: Re: SVN revision number in CFBundleVersion
- From: Aaron Burghardt <email@hidden>
- Date: Wed, 3 Aug 2005 16:06:45 -0400
On Aug 3, 2005, at 2:01 AM, Jean-Francois Roy wrote:
Please note that it is quite possible to have an old revision
number if you do not update your repository. For example, if you
make a commit from revision 25 to 26, and do not perform an update
on the repository before running this script, you will get 25 in
your Info.plist as the CFBundleVersion. This is simply how
Subversion works.
I've been working on solving the same problem this week, and I came
up with the following script. I have a Run Script phase as my first
build phase and this is from the beginning of the script. It hasn't
seen much use, but seems to work. In short, it performs an "svn
update ." on the working copy directory if the repository is reachable.
svnPath="/usr/local/subversion/bin/svn"
repoURL=`${svnPath} info | awk '$1=="URL:" { print $2 }'`
${svnPath} info $repoURL > /dev/null && canReachRepo=YES
if [ "${canReachRepo}" == "YES" ] ; then
${svnPath} update .
fi
Also, here is an idea incrementing build numbers from a discussion in
May <http://lists.apple.com/archives/cocoa-dev/2005/May/msg02561.html>:
Not sure if you know this, but you can put a variable into
CFBundleShortVersionString, and then set that variable in the XCode
build settings.
For example, I have CFBundleShortVersionString = $(VERSION_STRING)
and the $(VERSION_STRING) is a variable in the xcode target build
setting that I increment with a perl script in my makefile (i use
xcodebuild). I haven't tried with 2.0 but something very similar
should work. And if agvtool works then you can just use that
variable. Agvtool in 1.5 wouldn't allow a major.minor.revision
version and the marketing-version never worked :(.
Hope this helps,
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden