• 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: build numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build numbers


  • Subject: Re: build numbers
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 15 Sep 2004 14:28:58 +0200

On 15. Sep 2004, at 13:45, Christian Schneider wrote:

is it possible to have an automatically incremented build number that is
accessible from within a Cocoa programme? I'd like to output that number
to a log file every time my app starts.

I'm using the CFBundleVersion and a format like "1.0b27" where the latter part is the build number (and compliant with Apples guidelines).


Then to increment it I use:

mv Info.plist Info.plist_backup && pl < Info.plist_backup \
| perl -pe > Info.plist 's/(CFBundleVersion = ".+\D)(\d+)(";)/$1.($2+1).$3/eg'


I only run this (as part of my build script) when I do deployment builds. I assume you can add it to the Xcode build process.

Interestingly I recently wrote about this in my blog ;)
--
http://macromates.com/ ::: TextMate, OS X text editor
http://macromates.com/sigpipe/ ::: Personal weblog about programming


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: build numbers
      • From: Stephane Sudre <email@hidden>
References: 
 >build numbers (From: Christian Schneider <email@hidden>)

  • Prev by Date: Re: Manual filling NSTableView
  • Next by Date: NSOutlineView: prevent item to expand on drag
  • Previous by thread: Re: build numbers
  • Next by thread: Re: build numbers
  • Index(es):
    • Date
    • Thread