Add a build phase to increment the build number with every build.

This commit is contained in:
Jeremy Rand 2021-07-16 14:53:17 -04:00
parent 9f3dc2c7c2
commit da478782d4
2 changed files with 22 additions and 1 deletions

View File

@ -142,6 +142,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 9D51561426A1EF7C0075EBC7 /* Build configuration list for PBXNativeTarget "ListenerApp" */;
buildPhases = (
9D51562B26A20CE10075EBC7 /* ShellScript */,
9D5155EB26A1EF7B0075EBC7 /* Sources */,
9D5155EC26A1EF7B0075EBC7 /* Frameworks */,
9D5155ED26A1EF7B0075EBC7 /* Resources */,
@ -260,6 +261,26 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
9D51562B26A20CE10075EBC7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "#!/bin/bash\nbN=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbN=$(expr $bN + 1)\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $bN\" \"$INFOPLIST_FILE\"\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9D5155EB26A1EF7B0075EBC7 /* Sources */ = {
isa = PBXSourcesBuildPhase;

View File

@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>