• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Updating a Build Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Updating a Build Number
      • From: Seth Willits <email@hidden>
    • Re: Updating a Build Number
      • From: Marco S Hyman <email@hidden>
    • Re: Updating a Build Number
      • From: Philip Aker <email@hidden>
References: 
 >Updating a Build Number (From: Seth Willits <email@hidden>)
 >Re: Updating a Build Number (From: Chris Espinosa <email@hidden>)
 >Re: Updating a Build Number (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: NSString Retain Count of 2147483647
  • Next by Date: Re: NSString Retain Count of 2147483647
  • Previous by thread: Re: Updating a Build Number
  • Next by thread: Re: Updating a Build Number
  • Index(es):
    • Date
    • Thread