title: Xcode-Increment build number only during ARCHIVE?
body: <p>I have found a few other posts that show how to add a script to increment the build number with a script:</p>
  
  <p><a href="https://stackoverflow.com/questions/9258344/xcode-better-way-of-incrementing-build-number">Better way of incrementing build number?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/7371345/xcode-projects-build-number">Xcode project&#39;s &quot;Build number&quot;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/4694070/can-xcode-insert-the-version-number-into-a-librarys-filename-when-building">Can Xcode insert the version number into a library&#39;s filename when building?</a></p>
  
  <p>But what I want to do, is only increase the build number when I use ARCHIVE (both before and after).</p>
  
  <p>Example:
  If current build number is 21, then when I choose Product > Archive the build number will be increased to 22, it will go through its process of building and creating the Archive file with the build number of 22, and then when it is finished archiving, it will increase the build number to 23.</p>