-
Notifications
You must be signed in to change notification settings - Fork 3
/
Fastfile
118 lines (83 loc) · 3.72 KB
/
Fastfile
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
default_platform(:ios)
platform :ios do
desc "Push a new dev build to TestFlight"
lane :dev_build do |options|
current_build = get_info_plist_value(path: "./GokadaDriver/Info.plist", key: "CFBundleVersion")
new_build = options[:build] || current_build.to_i + 1
# Increment the build number (not the version number)
set_info_plist_value(path: "./GokadaDriver/Info.plist", key: "CFBundleVersion", value: new_build.to_s)
if options[:version]
set_info_plist_value(path: "./GokadaDriver/Info.plist", key: "CFBundleShortVersionString", value: options[:version])
end
build_app(workspace: "GokadaDriver.xcworkspace", scheme: "GokadaDriver")
upload_to_testflight(
skip_waiting_for_build_processing: true,
app_identifier: "ng.gokada.gokada"
)
version = options[:version] || get_version_number(
xcodeproj: "GokadaDriver.xcodeproj",
target: "GokadaDriver"
)
git_commit(path: "./GokadaDriver/Info.plist", message: "IOS Dev Build #{version}(#{new_build})")
push_to_git_remote
end
desc "Push a new staging build to TestFlight"
lane :staging_build do |options|
current_build = get_info_plist_value(path: "./GokadaDriver/Info-Staging.plist", key: "CFBundleVersion")
new_build = options[:build] || current_build.to_i + 1
# Increment the build number (not the version number)
set_info_plist_value(path: "./GokadaDriver/Info-Staging.plist", key: "CFBundleVersion", value: new_build.to_s)
if options[:version]
set_info_plist_value(path: "./GokadaDriver/Info-Staging.plist", key: "CFBundleShortVersionString", value: options[:version])
end
build_app(workspace: "GokadaDriver.xcworkspace", scheme: "GokadaDriver-Staging")
upload_to_testflight(
skip_waiting_for_build_processing: true,
app_identifier: "ng.gokada.gokada.staging"
)
version = options[:version] || get_version_number(
xcodeproj: "GokadaDriver.xcodeproj",
target: "GokadaDriver-Staging"
)
git_commit(path: "./GokadaDriver/Info-Staging.plist", message: "IOS Staging Build #{version}(#{new_build})")
push_to_git_remote
end
desc "Push a new production build to TestFlight"
lane :production_build do |options|
current_build = get_info_plist_value(path: "./GokadaDriver/Info-Release.plist", key: "CFBundleVersion")
new_build = options[:build] || current_build.to_i + 1
# Increment the build number (not the version number)
set_info_plist_value(path: "./GokadaDriver/Info-Release.plist", key: "CFBundleVersion", value: new_build.to_s)
if options[:version]
set_info_plist_value(path: "./GokadaDriver/Info-Release.plist", key: "CFBundleShortVersionString", value: options[:version])
end
scheme = options[:api_version] === 'v2' ? "GokadaDriver-Release-V2" : "GokadaDriver-Release"
build_app(workspace: "GokadaDriver.xcworkspace", scheme: scheme)
# Read changelog
upload_to_testflight(
skip_waiting_for_build_processing: true,
app_identifier: "ng.gokada.user"
)
version = options[:version] || get_version_number(
xcodeproj: "GokadaDriver.xcodeproj",
target: "GokadaDriver-Release"
)
git_commit(path: "./GokadaDriver/Info-Release.plist", message: "IOS Production Build #{version}(#{new_build}) API #{options[:api_version] || 'v1'}")
push_to_git_remote
end
desc "Push a new staging build to TestFlight"
lane :staging do |options|
ensure_git_status_clean
staging_build(options)
end
desc "Push a new production build to TestFlight"
lane :production do |options|
ensure_git_status_clean
production_build(options)
end
desc "Push a new dev build to TestFlight"
lane :dev do |options|
ensure_git_status_clean
dev_build(options)
end
end