Skip to content

Commit c869dc8

Browse files
authored
fix(ci): use sed instead of agvtool to update version in project.pbxproj (farouqaldori#39)
agvtool new-marketing-version doesn't work when Info.plist uses $(MARKETING_VERSION) variable references - it fails silently. This fix: - Uses sed to directly update MARKETING_VERSION in project.pbxproj - Uses sed to directly update CURRENT_PROJECT_VERSION in project.pbxproj - Also manually sets project.pbxproj to 1.3.3 (the correct version after the v1.3.3 release, which was built with the buggy workflow) Tested: sed commands correctly update both version fields in project.pbxproj
1 parent 114331d commit c869dc8

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ jobs:
4242
4343
- name: Update Xcode project version and commit
4444
run: |
45-
# Set marketing version (CFBundleShortVersionString) from tag
46-
agvtool new-marketing-version "${{ steps.version.outputs.version }}"
47-
# Set build number (CFBundleVersion) using timestamp for uniqueness
48-
agvtool new-version -all "$(date +%Y%m%d%H%M)"
45+
VERSION="${{ steps.version.outputs.version }}"
46+
BUILD_NUMBER="$(date +%Y%m%d%H%M)"
47+
48+
# Update MARKETING_VERSION directly in project.pbxproj
49+
# (agvtool doesn't work when Info.plist uses $(MARKETING_VERSION) variable references)
50+
sed -i '' "s/MARKETING_VERSION = .*;/MARKETING_VERSION = $VERSION;/g" ClaudeIsland.xcodeproj/project.pbxproj
51+
52+
# Update CURRENT_PROJECT_VERSION directly in project.pbxproj
53+
sed -i '' "s/CURRENT_PROJECT_VERSION = .*;/CURRENT_PROJECT_VERSION = $BUILD_NUMBER;/g" ClaudeIsland.xcodeproj/project.pbxproj
54+
55+
echo "✅ Set MARKETING_VERSION=$VERSION, CURRENT_PROJECT_VERSION=$BUILD_NUMBER"
4956
5057
# Commit version changes back to repository
5158
if git diff --quiet ClaudeIsland.xcodeproj/project.pbxproj; then
@@ -57,7 +64,7 @@ jobs:
5764
5865
# Commit version change (--no-verify bypasses pre-commit hooks)
5966
git add ClaudeIsland.xcodeproj/project.pbxproj
60-
git commit --no-verify -m "chore: bump version to ${{ steps.version.outputs.version }} [skip ci]"
67+
git commit --no-verify -m "chore: bump version to $VERSION [skip ci]"
6168
6269
# Push to main branch
6370
git push origin HEAD:main

ClaudeIsland.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
"$(inherited)",
298298
"@executable_path/../Frameworks",
299299
);
300-
MARKETING_VERSION = 1.2;
300+
MARKETING_VERSION = 1.3.3;
301301
PRODUCT_BUNDLE_IDENTIFIER = com.engels74.ClaudeIsland;
302302
PRODUCT_NAME = "Claude Island";
303303
REGISTER_APP_GROUPS = YES;
@@ -332,7 +332,7 @@
332332
"$(inherited)",
333333
"@executable_path/../Frameworks",
334334
);
335-
MARKETING_VERSION = 1.2;
335+
MARKETING_VERSION = 1.3.3;
336336
PRODUCT_BUNDLE_IDENTIFIER = com.engels74.ClaudeIsland;
337337
PRODUCT_NAME = "Claude Island";
338338
REGISTER_APP_GROUPS = YES;

0 commit comments

Comments
 (0)