-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFastfile
More file actions
89 lines (71 loc) · 2.14 KB
/
Fastfile
File metadata and controls
89 lines (71 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require "shellwords"
default_platform(:ios)
platform :ios do
private_lane :asc_api_key do
app_store_connect_api_key(
key_id: ENV["ASC_KEY_ID"],
issuer_id: ENV["ASC_ISSUER_ID"],
key_filepath: ENV["ASC_KEY_PATH"],
in_house: false
)
end
private_lane :build_for_store do
if ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"].to_s.strip.empty?
ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "30"
end
if ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"].to_s.strip.empty?
ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "5"
end
api_key = asc_api_key
setup_ci if ENV["CI"]
if ENV["GITHUB_RUN_NUMBER"]
increment_build_number(
xcodeproj: "DevLog.xcodeproj",
build_number: ENV["GITHUB_RUN_NUMBER"]
)
end
match(
api_key: api_key,
type: "appstore",
readonly: ENV["CI"] == "true"
)
matchProvisioningProfileMapping = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] || {}
provisioningProfileSpecifier = matchProvisioningProfileMapping["opfic.DevLog"].to_s.strip
UI.user_error!("Missing provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty?
buildAppXcargs = [
"-skipPackagePluginValidation",
"CODE_SIGN_STYLE=Manual",
"DEVELOPMENT_TEAM=#{ENV["APP_STORE_TEAM_ID"]}",
"CODE_SIGN_IDENTITY=#{Shellwords.escape("Apple Distribution")}",
"PROVISIONING_PROFILE_SPECIFIER=#{Shellwords.escape(provisioningProfileSpecifier)}"
]
build_app(
project: "DevLog.xcodeproj",
scheme: "DevLog",
export_method: "app-store",
xcargs: buildAppXcargs.join(" ")
)
next api_key
end
lane :deploy_testflight do
api_key = build_for_store
upload_to_testflight(
api_key: api_key,
skip_waiting_for_build_processing: true
)
end
lane :testflight_build_only do
build_for_store
end
lane :release do
api_key = build_for_store
upload_to_app_store(
api_key: api_key,
force: true,
skip_metadata: true,
skip_screenshots: true,
submit_for_review: true,
automatic_release: false
)
end
end