Skip to content

Commit b447d13

Browse files
committed
fix: make api_key explicit and increment build number before gym invocation
1 parent 6339a84 commit b447d13

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

examples/SampleApp/fastlane/Fastfile

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,24 @@ platform :ios do
3838

3939
UI.message("Deploying to Testflight: #{deploy}")
4040

41+
if deploy
42+
increment_version_number(
43+
version_number: load_json(json_path: './package.json')['version'],
44+
xcodeproj: xcode_project
45+
)
46+
47+
current_build_number = app_store_build_number(
48+
api_key: appstore_api_key,
49+
live: false,
50+
app_identifier: bundle_id
51+
)
52+
53+
increment_build_number(
54+
build_number: current_build_number + 1,
55+
xcodeproj: xcode_project
56+
)
57+
end
58+
4159
settings_to_override = {
4260
BUNDLE_IDENTIFIER: bundle_id,
4361
PROVISIONING_PROFILE_SPECIFIER: "match AppStore #{bundle_id}"
@@ -57,30 +75,15 @@ platform :ios do
5775
)
5876

5977
if deploy
60-
increment_version_number(
61-
version_number: load_json(json_path: './package.json')['version'],
62-
xcodeproj: xcode_project
63-
)
64-
65-
current_build_number = app_store_build_number(
66-
api_key: appstore_api_key,
67-
live: false,
68-
app_identifier: bundle_id
69-
)
70-
71-
increment_build_number(
72-
build_number: current_build_number + 1,
73-
xcodeproj: xcode_project
74-
)
75-
7678
upload_to_testflight(
79+
api_key: appstore_api_key,
7780
groups: ['Testers'],
7881
changelog: 'Lots of amazing new features to test out!',
7982
reject_build_waiting_for_review: false,
8083
ipa: "#{build_output_directory}/#{output_ipa_name}"
8184
)
8285
else
83-
UI.message("Skipping Testflight upload! (deploy: #{deploy})")
86+
UI.message("Skipping Testflight upload! (deploy: #{deploy})")
8487
end
8588
end
8689

0 commit comments

Comments
 (0)