Skip to content

Instantly share code, notes, and snippets.

@aufflick
Last active December 22, 2015 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aufflick/6431993 to your computer and use it in GitHub Desktop.
Save aufflick/6431993 to your computer and use it in GitHub Desktop.
My version of the bundle version incrementing script
use strict;
use warnings;
if ($ENV{CONFIGURATION} =~ /^Release/)
{
my $plist = "$ENV{PROJECT_DIR}/$ENV{INFOPLIST_FILE}";
my $build_number = `/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $plist`;
chomp $build_number;
print "CFBundleVersion for this build is $build_number\n";
$build_number++;
print "CFBundleVersion for NEXT build is $build_number";
system("/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion $build_number' '$plist'");
}
exit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment