Re: Updating a Build Number
Re: Updating a Build Number
- Subject: Re: Updating a Build Number
- From: Scott Tooker <email@hidden>
- Date: Wed, 24 Jun 2009 07:58:40 -0700
On Jun 23, 2009, at 10:11 PM, Seth Willits wrote:
On Jun 23, 2009, at 9:42 PM, Chris Espinosa wrote:
Since before Intel came around our parts, I used a simple Run
script to increment the build number of my target. But when
building Universal Binaries, this gets executed twice. Once for
PPC and once for Intel. I was too lazy to fix that. :-p But now
that I'm building 32-bit and 64-bit for both PPC and Intel, it
gets executed 4 times. Where's the right place/what's the right
way to handle this?
Run Script build phases shouldn't run once per architecture. The
only iteration over architectures happens within the Compile
Sources phase.
That is, if you're building the target normally by setting the
Architectures build setting to the list of architectures to build.
If you've done something like clone your target so you're building
four separate targets, you shouldn't.
Hmm, ok. Someone else said the same thing.
Right now I'm still only compiling for 32-bit (trying to get some
support libraries building for 64-bit first and I thought of this).
Every time I build a Release version this increments by two. It
didn't used to, though.
#! /bin/bash
if [ "x$BUILD_STYLE" = "xRelease" ]; then
perl -pi -e'/CFBundleVersion/..s/([0-9]+)</sprintf"%d<",1+$1/ei'
Resources/Info.plist
fi
I should also note that I don't know Perl and am relying on this
script someone else wrote to still be working properly :)
If you are just looking to increment a simple build number, I'd
strongly encourage you to look at the agvtool tool provided as part of
Xcode Tools (man agvtool). This provides a convenient way to easily
version different builds of you application without having to manually
edit your Info.plist.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden