4

I use XCode 5 and it's a project's rule to increment version number by 1 with every commit.

Is there an easier way to go about doing it instead of manually incrementing it with every commit?

EDIT: If that's not possible, is there a chance we can get the last SVN revision number in the application code before committing?

Anton Unt
  • 1,835
  • 1
  • 21
  • 47
  • Did you have a look to this alreadY? https://gist.github.com/sekati/3172554 – Jekyll Mar 03 '14 at 11:25
  • I was concerning more about the fact that people writes scripts when they need incrementing version automatically in different occasion, and this is an indication that there is not such automatic way to do that... – Jekyll Mar 03 '14 at 11:48
  • Appreciate it. The scripts though can run automatically, right? Is there any such event there in XCode where we can run this script as soon as a commit is done? – Anton Unt Mar 03 '14 at 12:10
  • I am not sure, I don't have a MAC here now, so I cannot try anything... but I found another interesting post that may be of some help: http://blog.mplayerx.org/blog/2013/05/10/use-version-number-with-xcode-and-git/. – Jekyll Mar 03 '14 at 14:00

1 Answers1

0

If your goal is just to have an iterative build number / version number and you are a little handy with the shell you could write a pre-build script that gets the SVN Revision number and then sets it into the Info Plist

You could use any combination of tools to craft exactly the build number you wanted, and then whenever a build was made the info plist would have the latest build number present.

Community
  • 1
  • 1
BadPirate
  • 25,802
  • 10
  • 92
  • 123