fastlane-plugin-fastci 0.0.10 → 0.0.12
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/lib/fastlane/plugin/fastci/actions/detect_unused_code_action.rb +13 -2
- data/lib/fastlane/plugin/fastci/actions/package_action.rb +12 -6
- data/lib/fastlane/plugin/fastci/helper/dingding_helper.rb +7 -0
- data/lib/fastlane/plugin/fastci/helper/environment.rb +2 -5
- 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: beca80c5ed38df0f56430ea53056399285eaf4eb465c7918cca00dc6a0e65d75
|
|
4
|
+
data.tar.gz: b22ec9b71c62abc98c57860e140781f5cf3753d86498e696b68c3a6e0a131fe6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81c9c0f0ff28e37828515264276656128d3e14c8eb4c4b99add923a55e95e8876c59a1376ed4fde9951b4cf680aeff73ba4a25c51226c0208aa7e8c92904068a
|
|
7
|
+
data.tar.gz: 468dfc9af7d196b7c3d5360881aefae651a58ec2f240d9233c0063c20d2b91c60e04ef39e6a42d66cfdb2ea3e494f44690ace64239558eb60223fec53f4ff3d6
|
|
@@ -36,9 +36,13 @@ module Fastlane
|
|
|
36
36
|
log_file = sh("ls -t #{log_dir}/*.log | head -n 1").strip
|
|
37
37
|
index_store_path = CommonHelper.extract_index_store_path(log_file)
|
|
38
38
|
|
|
39
|
-
schemes = Environment.
|
|
39
|
+
schemes = Environment.extra_schemes
|
|
40
|
+
scheme = params[:scheme] || Environment.scheme
|
|
41
|
+
|
|
40
42
|
if schemes.empty?
|
|
41
|
-
schemes =
|
|
43
|
+
schemes = [scheme]
|
|
44
|
+
else
|
|
45
|
+
schemes = schemes + [scheme]
|
|
42
46
|
end
|
|
43
47
|
|
|
44
48
|
# 运行 Periphery 扫描
|
|
@@ -70,6 +74,13 @@ module Fastlane
|
|
|
70
74
|
|
|
71
75
|
def self.available_options
|
|
72
76
|
[
|
|
77
|
+
FastlaneCore::ConfigItem.new(
|
|
78
|
+
key: :scheme,
|
|
79
|
+
description: "不采取默认配置,自定义 `scheme` 名称",
|
|
80
|
+
optional: true,
|
|
81
|
+
default_value: nil,
|
|
82
|
+
type: String
|
|
83
|
+
),
|
|
73
84
|
FastlaneCore::ConfigItem.new(
|
|
74
85
|
key: :is_from_package,
|
|
75
86
|
description: "是否从打包流程调用",
|
|
@@ -44,7 +44,7 @@ module Fastlane
|
|
|
44
44
|
build: build
|
|
45
45
|
)
|
|
46
46
|
time = Time.new.strftime("%Y%m%d%H%M")
|
|
47
|
-
version = Actions::GetVersionNumberAction.run(target:
|
|
47
|
+
version = Actions::GetVersionNumberAction.run(target: scheme)
|
|
48
48
|
build = Actions::GetBuildNumberAction.run({})
|
|
49
49
|
# 生成ipa包的名字格式
|
|
50
50
|
ipaName = "#{scheme}_#{export_method}_#{version}_#{build}.ipa"
|
|
@@ -124,7 +124,7 @@ module Fastlane
|
|
|
124
124
|
|
|
125
125
|
ipa_path = "#{Constants.IPA_OUTPUT_DIR}/#{ipaName}"
|
|
126
126
|
|
|
127
|
-
if
|
|
127
|
+
if gym_method == "app-store"
|
|
128
128
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-打包完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
129
129
|
DingdingHelper.sendMarkdown(notiText)
|
|
130
130
|
|
|
@@ -170,7 +170,10 @@ module Fastlane
|
|
|
170
170
|
|
|
171
171
|
# 代码分析
|
|
172
172
|
if is_analyze_swiftlint && gym_method != "app-store"
|
|
173
|
-
analyze_swiftlint(
|
|
173
|
+
other_action.analyze_swiftlint(
|
|
174
|
+
is_from_package: true,
|
|
175
|
+
configuration: configuration
|
|
176
|
+
)
|
|
174
177
|
# 结果复制到桌面
|
|
175
178
|
FileUtils.cp(SWIFTLINT_HTML_FILE, target_path)
|
|
176
179
|
FileUtils.cp(SWIFTLINT_ANALYZE_HTML_FILE, target_path)
|
|
@@ -181,7 +184,9 @@ module Fastlane
|
|
|
181
184
|
|
|
182
185
|
# 重复代码检查
|
|
183
186
|
if is_detect_duplicity_code && gym_method != "app-store"
|
|
184
|
-
detect_code_duplicity(
|
|
187
|
+
other_action.detect_code_duplicity(
|
|
188
|
+
is_all: true
|
|
189
|
+
)
|
|
185
190
|
# 结果复制到桌面
|
|
186
191
|
FileUtils.cp(DUPLICITY_CODE_HTML_FILE, target_path)
|
|
187
192
|
UI.message("*************| 重复代码检查完成 |*************")
|
|
@@ -191,7 +196,8 @@ module Fastlane
|
|
|
191
196
|
|
|
192
197
|
# 无用代码检查
|
|
193
198
|
if is_detect_unused_code && gym_method != "app-store"
|
|
194
|
-
|
|
199
|
+
other_action.detect_unused_code(
|
|
200
|
+
scheme: scheme,
|
|
195
201
|
is_from_package: true,
|
|
196
202
|
configuration: configuration
|
|
197
203
|
)
|
|
@@ -204,7 +210,7 @@ module Fastlane
|
|
|
204
210
|
|
|
205
211
|
# 无用图片检查
|
|
206
212
|
if is_detect_unused_image && gym_method != "app-store"
|
|
207
|
-
|
|
213
|
+
other_action.detect_unused_image()
|
|
208
214
|
# 结果复制到桌面
|
|
209
215
|
FileUtils.cp(Constants.UNUSED_IMAGE_HTML_FILE, target_path)
|
|
210
216
|
UI.message("*************| 无用图片检查完成 |*************")
|
|
@@ -6,6 +6,13 @@ module Fastlane
|
|
|
6
6
|
class DingdingHelper
|
|
7
7
|
|
|
8
8
|
def self.sendMarkdown(text)
|
|
9
|
+
|
|
10
|
+
# 检查钉钉 Token 是否存在
|
|
11
|
+
unless CommonHelper.is_validate_string(Environment.dingdingToken)
|
|
12
|
+
UI.message("*************| 跳过钉钉消息通知(未配置 Token)|*************")
|
|
13
|
+
return
|
|
14
|
+
end
|
|
15
|
+
|
|
9
16
|
UI.message("*************| 开始钉钉消息通知 |*************")
|
|
10
17
|
|
|
11
18
|
curl = %Q{
|
|
@@ -13,9 +13,6 @@ module Fastlane
|
|
|
13
13
|
def self.scheme
|
|
14
14
|
ENV['SCHEME_NAME']
|
|
15
15
|
end
|
|
16
|
-
def self.target
|
|
17
|
-
ENV['TARGET_NAME']
|
|
18
|
-
end
|
|
19
16
|
def self.workspace
|
|
20
17
|
ENV['WORKSPACE_NAME']
|
|
21
18
|
end
|
|
@@ -25,8 +22,8 @@ module Fastlane
|
|
|
25
22
|
def self.extension_bundle_ids
|
|
26
23
|
ENV['EXTENSION_BUNDLE_IDS']&.split(",") || []
|
|
27
24
|
end
|
|
28
|
-
def self.
|
|
29
|
-
ENV['
|
|
25
|
+
def self.extra_schemes
|
|
26
|
+
ENV['EXTRA_SCHEMES_NAME']&.split(",") || []
|
|
30
27
|
end
|
|
31
28
|
|
|
32
29
|
# 证书描述文件等放置的文件夹名称
|