• 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: Setting version numbers and strings using shell scripts and xcodebuild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting version numbers and strings using shell scripts and xcodebuild


  • Subject: Re: Setting version numbers and strings using shell scripts and xcodebuild
  • From: Rick Altherr <email@hidden>
  • Date: Wed, 3 Sep 2008 11:24:35 -0700


On Sep 3, 2008, at 11:04 AM, OSullivan, Steve wrote:

Hello all,

When building a project from the command line using Xcode 3.1 (xcodebuild),
can I set the version numbers and strings from the shell script, or is that
something that need to be set manually through the Xcode gui itself?


I have been looking through the documentation, but cannot seem to find an
entry that answers this.... :(


Thanks for any and all assistance!

Regards,

Steve O'Sullivan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com


This email sent to email@hidden


It depends on how you are handling version numbers of course, but if you are using the Apple generic versioning scheme, you can use agvtool in /Developer/usr/bin to set both the marketing and source versions.

Otherwise you can pass build settings on the command-line, so something like

xcodebuild -target Foo -configuration Release -- OTHER_CFLAGS="$ (inherited) -DMY_VERSION=10"

would probably work. You could also define OTHER_CFLAGS in your project to set a define based on a new build settings (i.e. OTHER_CFLAGS="-DMY_VERSION=$(MY_VERSION)") and then passing the new build setting on the command line.

You could also just use an xcconfig file to specify the build settings related to versioning and just update the xcconfig file as part of your release process.

--
Rick Altherr
Architecture and Performance Group
email@hidden


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Setting version numbers and strings using shell scripts and xcodebuild (From: "OSullivan, Steve" <email@hidden>)

  • Prev by Date: Setting version numbers and strings using shell scripts and xcodebuild
  • Next by Date: Re: Automatic snapshots - Usable?
  • Previous by thread: Setting version numbers and strings using shell scripts and xcodebuild
  • Next by thread: breakpoints ignored while running unit tests! Why?
  • Index(es):
    • Date
    • Thread