Re: Versioning / increasing build number
Re: Versioning / increasing build number
- Subject: Re: Versioning / increasing build number
- From: Dave DeLong <email@hidden>
- Date: Tue, 09 Feb 2010 09:14:54 -0700
Another option, which I posted as a comment on my site (linked to previously), is to move Info.plist to Info.template.plist, and then use the build number script to generate the Info.plist that the compiler will actually use. That way you can set an ignore on the generated Info.plist file (if you're using a source control system), but still have the original template plist in the repository.
Dave
On Feb 9, 2010, at 9:09 AM, Jens Miltner wrote:
> Just one more thought:
>
> you could have a shell script build phase that runs whatever tool you're using to bump the build number and only run this when building the deployment configuration (e.g. by checking ${CONFIGURATION} in your script, or by activating the "Run script only when installing" checkbox in the script build phase, which seems to have the side effect of only executing during the deployment builds).
>
> That way, your debug builds (during your development cycles) won't proliferate the build numbers, but any time you run a deployment build, the build number gets bumped...
>
> </jum>
>
>
> Am 06.02.2010 um 00:58 schrieb Stefan Wolfrum:
>
>> thanks a lot for both replies!!
>>
>> I don't know which approach to follow though.
>> I'm currently not using a versioning system so maybe Jonathan's method is sufficient.
>> However, I like Gwynne's method, too...
>> *sigh*
>>
>> But at least: problem solved!
>>
>> Thanks and sorry: I'll spend more time with Google next time before I ask here. (And I know the Xcode mailing list now, too...)
>>
>> Stefan.
>>
>> Am 06.02.2010 um 00:09 schrieb Gwynne Raskind:
>>
>>> On Feb 5, 2010, at 1:56 PM, email@hidden wrote:
>>>>> 2) Right now the file doesn't get built new every time I build my application. So the number isn't increasing yet. How can this be achieved?
>>>> I use the following in a script phase to get a perpetually increasing build number.
>>>>
>>>> #!/bin/bash
>>>> # http://davedelong.com/blog/2009/04/15/incrementing-build-numbers-xcode
>>>> buildNumber=$(/usr/libexec/PlistBuddy -c "Print MGSBuildNumber" Info.plist)
>>>> buildNumber=$(($buildNumber + 1))
>>>> /usr/libexec/PlistBuddy -c "Set :MGSBuildNumber $buildNumber" Info.plist
>>>
>>>
>>> This taints your original Info.plist with changing data, which is annoying for version-controlled code. You can find the script I use at <http://blog.darkrainfall.org/?p=185>; it's a short AppleScript that tricks Xcode into doing the right thing.
>>>
>>> -- Gwynne
>>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden