Skip to content

Commit d9fff0f

Browse files
ci: Fix version suffix beta issue for app clip (#3130)
1 parent 7cd187e commit d9fff0f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

fastlane/Fastfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,33 @@ platform :ios do
1919
xcodeproj: "./Samples/iOS-Swift/iOS-Swift.xcodeproj",
2020
target: "iOS-Swift"
2121
)
22-
version = version.split("-", -1)[0]
22+
new_version = version.split("-", -1)[0]
23+
24+
# We also need to replace the MARKETING_VERSION otherwise the build will fail with
25+
# error: The CFBundleShortVersionString of an App Clip ('8.9.0-beta.1') must match that of its containing parent app ('8.9.0').
26+
sh "sed -i '' 's/MARKETING_VERSION = #{version}/MARKETING_VERSION = #{new_version}/g' ../Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj"
2327

2428
set_info_plist_value(
2529
path: ios_swift_infoplist_path,
2630
key: "CFBundleShortVersionString",
27-
value: version
31+
value: new_version
2832
)
2933
set_info_plist_value(
3034
path: ios_swift_clip_infoplist_path,
3135
key: "CFBundleShortVersionString",
32-
value: version
36+
value: new_version
3337
)
3438

3539
sentryInfoPlistPath = "./Sources/Sentry/Info.plist"
3640
set_info_plist_value(
3741
path: sentryInfoPlistPath,
3842
key: "CFBundleShortVersionString",
39-
value: version
43+
value: new_version
4044
)
4145
set_info_plist_value(
4246
path: sentryInfoPlistPath,
4347
key: "CFBundleVersion",
44-
value: version
48+
value: new_version
4549
)
4650
end
4751

0 commit comments

Comments
 (0)