Auto-set the build number from git; bump to 2.1

Add Scripts/update_build_number.sh (the shared indie build script) and wire it into both targets as a postBuildScripts phase. On each build it sets CFBundleVersion to the git commit count, writes a BuildDate key (surfaced by IndieAbout), and tags the marketing version. Run as a post-build phase rather than post-compile so it lands after the Info.plist/dSYM exist, which also avoids an Xcode 26 build cycle. Bumps MARKETING_VERSION to 2.1.

Claude-Session: https://claude.ai/code/session_01A9CfUa4E9Zd5swfoNsYPs7
This commit is contained in:
2026-06-20 14:17:21 -04:00
parent 3bba78eab5
commit 6d882998fa
2 changed files with 52 additions and 1 deletions
+17 -1
View File
@@ -11,7 +11,7 @@ settings:
base:
SWIFT_VERSION: "6.0"
DEVELOPMENT_TEAM: ${APPLE_TEAM_ID}
MARKETING_VERSION: "2.0"
MARKETING_VERSION: "2.1"
CURRENT_PROJECT_VERSION: "1"
ENABLE_USER_SCRIPT_SANDBOXING: "NO"
@@ -47,6 +47,14 @@ targets:
- package: IndieAbout
- package: Yams
- target: Workouts Watch App
postBuildScripts:
- script: '"${SRCROOT}/Scripts/update_build_number.sh"'
name: Update Build Number
shell: /bin/sh
basedOnDependencyAnalysis: false
inputFiles:
- $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
- $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Info.plist
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts
@@ -70,6 +78,14 @@ targets:
excludes:
- "Resources/Info-*.plist"
- "Resources/*.entitlements"
postBuildScripts:
- script: '"${SRCROOT}/Scripts/update_build_number.sh"'
name: Update Build Number
shell: /bin/sh
basedOnDependencyAnalysis: false
inputFiles:
- $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
- $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Info.plist
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts.watchkitapp