[Prev] Thread [Next] |
[Prev] Date [Next]
Re: Updating a Build Number
Fri Jun 26 14:00:46 2009
On Jun 24, 2009, at 7:58 AM, Scott Tooker wrote:
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.
I just looked at this (I read Chris Hanson's blog since the man page
wasn't clear enough for me). I think it's a bit silly. Why should I
have to quite Xcode just to increment the build number? Any time I
build my "Release" configuration, I simply want the build number to
increase. I don't see why it should be any more complicated than that
(at least in my situation), so I created that simple build script.
Xcode doesn't like it though.
When building a target, Xcode processes Info.plist before anything
else. This means that it creates a plist file and moves it into the
build products folder, *then*, my script is executed which increases
the value in the source products' Info.plist file. So the number in
the source-products is actually N+1 rather than being the same number.
The problem there is that if I then commit the code, it's not the
right value relative to the code. So that's kinda sucky.
The bigger problem though is that if I do a build, let's say the
version is 100 in the final built app, and Info.plist in the source
folder says 101. If I build again, Info.plist is updated to 102, but
*VERY VERY OFTEN* the app's Info.plist is left unchanged -- it'd still
be 100. Then I have to wack build again, and it then jumps to 102. I
don't know what the heck is going on here, but it's annoying. :\
A third problem is that I have a build script at the very end of
building which is supposed to zip the file for me and create a digital
signature on it for Sparkle and some other things, but that happens
*before* code signing so it's not zipping the correct/final result.
There seems to be no way to change this.
The solution I see to all of this is to create a build script fired of
from Terminal that uses agvtool to do the build and then do all of my
post processing. But quitting Xcode is not exactly my idea of use-
friendliness. I'll try avoiding agvtool and making my own incrementing
script so that Xcode doesn't need to be quit.
It seems like this really should be simpler given that everyone needs
to do it. :-\
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
This email sent to [EMAIL PROTECTED]