Wednesday, March 25, 2009

XCode - Development Version Numbers

In the Cello development I have numbered each checkin. This checkin number is recorded in a tag-line in each file that is checked in, and in the checkin comment (or message). Once I have reached the stage of building the test applications I have been careful to build a version of the test application with the build number and archive it. The idea behind this is that when I find a regression or performance anomaly I can test against the checkin points and find out where the problem was introduced. Until now I have numbered the builds individually after they have been constructed but it is possible to get XCode to do this for you automatically.

To do this I did the following:
  • Added a new file history.xconfig to the project.
  • In history.xconfig added a single line CELLO_BUILD_NUMBER=0129
  • Changed the build settings so that they are "based on history.xconfig". You do this by choosing the build settings from a the "based on" popup that appears in the build settings pane.
  • Changed the Product Name in the build settings to Cello $(CELLO_BUILD_NUMBER)

The effect of this is each time I change history.xconfig Cello will be built with the appropriate build number.

No comments: