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 10:42:46 -0700
On Jun 24, 2009, at 9:29 AM, Philip Aker wrote:
On 2009-06-24, at 07:58:40, 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 want to use $CURRENT_PROJECT_VERSION for my build number and
$VERSION_INFO_PREFIX for something I only have to change every 1000
builds.
This should work, though you usually don't change $VERSION_INFO_PREFIX
unless you have a massive change in your product (since that setting
is just a prefix, like NS, to place in front of some generated
variables).
I would like to have my build numbers starting at 001 and increment
so that the next numbers are 002, 003, etc. Will agvtool handle this?
$CURRENT_PROJECT__VERSION needs to be an integer or floating point
number. However, if you need the "002" format for something
specialized like a filename, you should be able to use <insert your
scripting language of choice here> to transform the number into
something suitable for the filename.
The goal is to upload my stuff for testing and zip up the product in
a folder titled SomeProduct1.2.007.zip (for example) using mkdir -p,
ditto -ck in a build phase. That way, all the releases appear
sequentially in the manager's folder and it's easy for us to
coordinate and access previous releases/builds.
This (with an appropriate run script) should work. Just keep in mind
that you need to call agvtool to increment the version number, so
doing that from within a project's build is kinda sketchy (since you
are modifying the project itself). My usual workflow is to run
"agvtool next-version" on the command line when I'm ready to cut a new
submission of a project and then build the new submission.
There's also some nice integration with Subversion and CVS so you can
automatically check in and tag the version bump.
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