Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SunHat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Only runs during Release (Archive uses Release); skipped in Debug.\n# Reads buildnumber.txt, increments by 1, writes the new number back\n# to the file AND into the built product's Info.plist. After archiving,\n# commit the updated buildnumber.txt to lock in the number.\nif [ \"$CONFIGURATION\" != \"Release\" ]; then\n exit 0\nfi\n\nBUILD_NUMBER_FILE=\"$SRCROOT/buildnumber.txt\"\nif [ ! -f \"$BUILD_NUMBER_FILE\" ]; then\n echo \"1\" > \"$BUILD_NUMBER_FILE\"\nfi\n\nCURRENT=$(cat \"$BUILD_NUMBER_FILE\")\nBUILD_NUMBER=$((CURRENT + 1))\necho \"$BUILD_NUMBER\" > \"$BUILD_NUMBER_FILE\"\n\nPLIST=\"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\necho \"[SunHat] Build number: $CURRENT -> $BUILD_NUMBER\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $BUILD_NUMBER\" \"$PLIST\"\n";
shellScript = "# Build-number policy:\n# - Xcode Cloud (CI_BUILD_NUMBER set): CFBundleVersion = CI_BUILD_NUMBER.\n# Xcode Cloud numbers are per-workflow and strictly increasing, and this\n# workflow is the only one that archives, so App Store Connect uploads\n# never collide. The CI checkout is never modified: buildnumber.txt is a\n# local-only file (gitignored).\n# - Local Release archives: read buildnumber.txt, increment by 1, write the\n# new number back to the file AND into the built product's Info.plist.\n# Local numbers are throwaway; Xcode Cloud is authoritative for uploads.\nif [ \"$CONFIGURATION\" != \"Release\" ]; then\n exit 0\nfi\n\nPLIST=\"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\n\nif [ -n \"$CI_BUILD_NUMBER\" ]; then\n echo \"[SunHat] Xcode Cloud build: CFBundleVersion = $CI_BUILD_NUMBER\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $CI_BUILD_NUMBER\" \"$PLIST\"\n exit 0\nfi\n\nBUILD_NUMBER_FILE=\"$SRCROOT/buildnumber.txt\"\nif [ ! -f \"$BUILD_NUMBER_FILE\" ]; then\n echo \"1\" > \"$BUILD_NUMBER_FILE\"\nfi\n\nCURRENT=$(cat \"$BUILD_NUMBER_FILE\")\nBUILD_NUMBER=$((CURRENT + 1))\necho \"$BUILD_NUMBER\" > \"$BUILD_NUMBER_FILE\"\n\necho \"[SunHat] Build number: $CURRENT -> $BUILD_NUMBER\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $BUILD_NUMBER\" \"$PLIST\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
ReferencedContainer = "container:SunHat.xcodeproj">
</BuildableReference>
</MacroExpansion>
<StoreKitConfigurationFileReference
identifier = "../SunHat.storekit">
</StoreKitConfigurationFileReference>
<Testables>
<TestableReference
skipped = "NO"
Expand Down