fastlane-plugin-fastci 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/fastlane/plugin/fastci/actions/package_action.rb +29 -15
- data/lib/fastlane/plugin/fastci/actions/upload_fir_action.rb +1 -0
- data/lib/fastlane/plugin/fastci/actions/upload_store_action.rb +25 -12
- data/lib/fastlane/plugin/fastci/helper/environment.rb +1 -1
- data/lib/fastlane/plugin/fastci/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: faf1e468abfff98b16e2557cddb145dabe01b80b28c241b1aab2acb5327fb1f4
|
|
4
|
+
data.tar.gz: 4617a95f8a655b293a04908f5b85647a59933b880187e15811c31b421b8086dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a01937a687c7510fe23e32ab1eb7532d2db9e506d3cde271815f177621bb1d96aa6977a015c1318ce1ef181a11d2cd2c6d7b20914e197215adbd94e9e9ee886
|
|
7
|
+
data.tar.gz: d3c8f80cf8bd6331d84e2ed15d9d84cebaf8bbca9e363a73afd48397418699f6b38810c67182758de490a0f0c83d1627d32b15e7d593f3cb342eb3f7b289c434
|
data/README.md
CHANGED
|
@@ -47,7 +47,7 @@ fastlane_cache/ # 插件缓存文件夹
|
|
|
47
47
|
|
|
48
48
|
### 1. 自动打包
|
|
49
49
|
功能:自动编译并导出 ipa 包,支持多种打包方式和集成多项检查。
|
|
50
|
-
生成完的 ipa 会放在桌面上,非 ` app-store ` 配置了蒲公英或 fir 参数会自动上传蒲公英或 fir` app-store ` 配置了商店参数会自动上传商店。
|
|
50
|
+
生成完的 ipa 会放在桌面上,非 ` app-store ` 配置了蒲公英或 fir 参数会自动上传蒲公英或 fir` app-store ` 和 ` testFlight ` 配置了商店参数会自动上传商店。
|
|
51
51
|
|
|
52
52
|
` build `: 不指定的话内部有递增逻辑,格式为 ` 20250905.15(日期+当天包的次数) `
|
|
53
53
|
|
|
@@ -56,7 +56,7 @@ fastlane_cache/ # 插件缓存文件夹
|
|
|
56
56
|
```ruby
|
|
57
57
|
package(
|
|
58
58
|
configuration: "Debug", # 编译环境 Release/Debug
|
|
59
|
-
export_method: "development", # 打包方式 ad-hoc, enterprise, app-store, development
|
|
59
|
+
export_method: "development", # 打包方式 ad-hoc, enterprise, app-store, development, testFlight
|
|
60
60
|
version: nil, # 指定 version
|
|
61
61
|
build: nil, # 指定 build 号
|
|
62
62
|
is_analyze_swiftlint: false, # 是否代码分析
|
|
@@ -19,7 +19,7 @@ module Fastlane
|
|
|
19
19
|
is_detect_unused_code = params[:is_detect_unused_code] || false
|
|
20
20
|
is_detect_unused_image = params[:is_detect_unused_image] || false
|
|
21
21
|
release_notes = params[:release_notes] || ""
|
|
22
|
-
if export_method == "app-store"
|
|
22
|
+
if export_method == "app-store" || export_method == "testFlight"
|
|
23
23
|
configuration = "Release"
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -32,7 +32,7 @@ module Fastlane
|
|
|
32
32
|
# 安装 provisioningProfile
|
|
33
33
|
other_action.install_profile()
|
|
34
34
|
|
|
35
|
-
scheme = Environment.scheme
|
|
35
|
+
scheme = params[:scheme] || Environment.scheme
|
|
36
36
|
|
|
37
37
|
# 更改项目version
|
|
38
38
|
other_action.increment_version_number(
|
|
@@ -47,7 +47,7 @@ module Fastlane
|
|
|
47
47
|
version = Actions::GetVersionNumberAction.run(target: Environment.target)
|
|
48
48
|
build = Actions::GetBuildNumberAction.run({})
|
|
49
49
|
# 生成ipa包的名字格式
|
|
50
|
-
ipaName = "#{
|
|
50
|
+
ipaName = "#{scheme}_#{export_method}_#{version}_#{build}.ipa"
|
|
51
51
|
|
|
52
52
|
# 获取 Extension 的 Bundle ID(可能有多个,用逗号分隔)
|
|
53
53
|
extension_bundle_ids = Environment.extension_bundle_ids
|
|
@@ -62,7 +62,7 @@ module Fastlane
|
|
|
62
62
|
when "ad-hoc"
|
|
63
63
|
profile_name = Environment.provisioningProfiles_adhoc
|
|
64
64
|
extension_profile_names = Environment.extension_profiles_adhoc
|
|
65
|
-
when "app-store"
|
|
65
|
+
when "app-store", "testFlight"
|
|
66
66
|
profile_name = Environment.provisioningProfiles_appstore
|
|
67
67
|
extension_profile_names = Environment.extension_profiles_appstore
|
|
68
68
|
else
|
|
@@ -79,7 +79,9 @@ module Fastlane
|
|
|
79
79
|
|
|
80
80
|
UI.message("*************| 开始打包 |*************")
|
|
81
81
|
|
|
82
|
-
#
|
|
82
|
+
# 对于 testFlight,使用 app-store 方法
|
|
83
|
+
gym_method = export_method == "testFlight" ? "app-store" : export_method
|
|
84
|
+
|
|
83
85
|
gym_options = {
|
|
84
86
|
clean: true,
|
|
85
87
|
silent: true,
|
|
@@ -90,7 +92,7 @@ module Fastlane
|
|
|
90
92
|
output_name: ipaName,
|
|
91
93
|
output_directory: Constants.IPA_OUTPUT_DIR,
|
|
92
94
|
export_options: {
|
|
93
|
-
method:
|
|
95
|
+
method: gym_method
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
|
|
@@ -122,13 +124,18 @@ module Fastlane
|
|
|
122
124
|
|
|
123
125
|
ipa_path = "#{Constants.IPA_OUTPUT_DIR}/#{ipaName}"
|
|
124
126
|
|
|
125
|
-
if export_method == "app-store"
|
|
127
|
+
if export_method == "app-store" || export_method == "testFlight"
|
|
126
128
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-打包完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
127
129
|
DingdingHelper.sendMarkdown(notiText)
|
|
128
130
|
|
|
129
131
|
if CommonHelper.is_validate_string(Environment.connect_key_id) && CommonHelper.is_validate_string(Environment.connect_issuer_id)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
# 根据 export_method 决定是否为 TestFlight
|
|
133
|
+
is_test_flight = export_method == "testFlight"
|
|
134
|
+
|
|
135
|
+
other_action.upload_store(
|
|
136
|
+
release_notes: release_notes,
|
|
137
|
+
isTestFlight: is_test_flight
|
|
138
|
+
)
|
|
132
139
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-上传完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
133
140
|
DingdingHelper.sendMarkdown(notiText)
|
|
134
141
|
end
|
|
@@ -162,7 +169,7 @@ module Fastlane
|
|
|
162
169
|
end
|
|
163
170
|
|
|
164
171
|
# 代码分析
|
|
165
|
-
if is_analyze_swiftlint &&
|
|
172
|
+
if is_analyze_swiftlint && gym_method != "app-store"
|
|
166
173
|
analyze_swiftlint(is_from_package: true, configuration: configuration)
|
|
167
174
|
# 结果复制到桌面
|
|
168
175
|
FileUtils.cp(SWIFTLINT_HTML_FILE, target_path)
|
|
@@ -173,7 +180,7 @@ module Fastlane
|
|
|
173
180
|
end
|
|
174
181
|
|
|
175
182
|
# 重复代码检查
|
|
176
|
-
if is_detect_duplicity_code &&
|
|
183
|
+
if is_detect_duplicity_code && gym_method != "app-store"
|
|
177
184
|
detect_code_duplicity(is_all: true)
|
|
178
185
|
# 结果复制到桌面
|
|
179
186
|
FileUtils.cp(DUPLICITY_CODE_HTML_FILE, target_path)
|
|
@@ -183,7 +190,7 @@ module Fastlane
|
|
|
183
190
|
end
|
|
184
191
|
|
|
185
192
|
# 无用代码检查
|
|
186
|
-
if is_detect_unused_code &&
|
|
193
|
+
if is_detect_unused_code && gym_method != "app-store"
|
|
187
194
|
DetectUnusedCodeAction.run(
|
|
188
195
|
is_from_package: true,
|
|
189
196
|
configuration: configuration
|
|
@@ -196,7 +203,7 @@ module Fastlane
|
|
|
196
203
|
end
|
|
197
204
|
|
|
198
205
|
# 无用图片检查
|
|
199
|
-
if is_detect_unused_image &&
|
|
206
|
+
if is_detect_unused_image && gym_method != "app-store"
|
|
200
207
|
DetectUnusedImageAction.run({})
|
|
201
208
|
# 结果复制到桌面
|
|
202
209
|
FileUtils.cp(Constants.UNUSED_IMAGE_HTML_FILE, target_path)
|
|
@@ -225,6 +232,13 @@ module Fastlane
|
|
|
225
232
|
|
|
226
233
|
def self.available_options
|
|
227
234
|
[
|
|
235
|
+
FastlaneCore::ConfigItem.new(
|
|
236
|
+
key: :scheme,
|
|
237
|
+
description: "不采取默认配置,自定义 `scheme` 名称",
|
|
238
|
+
optional: true,
|
|
239
|
+
default_value: nil,
|
|
240
|
+
type: String
|
|
241
|
+
),
|
|
228
242
|
FastlaneCore::ConfigItem.new(
|
|
229
243
|
key: :configuration,
|
|
230
244
|
description: "编译环境 Release or Debug",
|
|
@@ -240,12 +254,12 @@ module Fastlane
|
|
|
240
254
|
),
|
|
241
255
|
FastlaneCore::ConfigItem.new(
|
|
242
256
|
key: :export_method,
|
|
243
|
-
description: "打包方式 ad-hoc, enterprise, app-store, development",
|
|
257
|
+
description: "打包方式 ad-hoc, enterprise, app-store, development, testFlight",
|
|
244
258
|
optional: true,
|
|
245
259
|
default_value: "development",
|
|
246
260
|
type: String,
|
|
247
261
|
verify_block: proc do |value|
|
|
248
|
-
valid_params = ["ad-hoc", "enterprise", "app-store", "development"]
|
|
262
|
+
valid_params = ["ad-hoc", "enterprise", "app-store", "development", "testFlight"]
|
|
249
263
|
unless valid_params.include?(value)
|
|
250
264
|
UI.user_error!("无效的打包方式: #{value}。支持的方式: #{valid_params.join(', ')}")
|
|
251
265
|
end
|
|
@@ -6,7 +6,6 @@ module Fastlane
|
|
|
6
6
|
# 上传 AppStore
|
|
7
7
|
class UploadStoreAction < Action
|
|
8
8
|
def self.run(params)
|
|
9
|
-
UI.message("*************| 开始上传 AppStore |*************")
|
|
10
9
|
|
|
11
10
|
release_notes = JSON.parse(params[:release_notes] || "") rescue ""
|
|
12
11
|
|
|
@@ -17,17 +16,25 @@ module Fastlane
|
|
|
17
16
|
duration: 1200, # optional (maximum 1200)
|
|
18
17
|
in_house: false # optional but may be required if using match/sigh
|
|
19
18
|
)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
|
|
20
|
+
if params[:isTestFlight]
|
|
21
|
+
UI.message("*************| 开始上传 TestFlight |*************")
|
|
22
|
+
other_action.upload_to_testflight(
|
|
23
|
+
skip_waiting_for_build_processing: true
|
|
24
|
+
)
|
|
25
|
+
else
|
|
26
|
+
UI.message("*************| 开始上传 AppStore |*************")
|
|
27
|
+
other_action.upload_to_app_store(
|
|
28
|
+
skip_metadata: false,
|
|
29
|
+
skip_screenshots: true,
|
|
30
|
+
run_precheck_before_submit: false,
|
|
31
|
+
precheck_include_in_app_purchases: false,
|
|
32
|
+
force: true,
|
|
33
|
+
submit_for_review: false,
|
|
34
|
+
automatic_release: false,
|
|
35
|
+
release_notes: release_notes
|
|
36
|
+
)
|
|
37
|
+
end
|
|
31
38
|
end
|
|
32
39
|
|
|
33
40
|
def self.description
|
|
@@ -41,6 +48,12 @@ module Fastlane
|
|
|
41
48
|
description: "更新文案, 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串",
|
|
42
49
|
optional: false,
|
|
43
50
|
type: String
|
|
51
|
+
),
|
|
52
|
+
FastlaneCore::ConfigItem.new(
|
|
53
|
+
key: :isTestFlight,
|
|
54
|
+
description: "是否为 TestFlight 打包",
|
|
55
|
+
optional: false,
|
|
56
|
+
type: Boolean
|
|
44
57
|
)
|
|
45
58
|
]
|
|
46
59
|
end
|