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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faf1e468abfff98b16e2557cddb145dabe01b80b28c241b1aab2acb5327fb1f4
4
- data.tar.gz: 4617a95f8a655b293a04908f5b85647a59933b880187e15811c31b421b8086dc
3
+ metadata.gz: beca80c5ed38df0f56430ea53056399285eaf4eb465c7918cca00dc6a0e65d75
4
+ data.tar.gz: b22ec9b71c62abc98c57860e140781f5cf3753d86498e696b68c3a6e0a131fe6
5
5
  SHA512:
6
- metadata.gz: 0a01937a687c7510fe23e32ab1eb7532d2db9e506d3cde271815f177621bb1d96aa6977a015c1318ce1ef181a11d2cd2c6d7b20914e197215adbd94e9e9ee886
7
- data.tar.gz: d3c8f80cf8bd6331d84e2ed15d9d84cebaf8bbca9e363a73afd48397418699f6b38810c67182758de490a0f0c83d1627d32b15e7d593f3cb342eb3f7b289c434
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.schemes
39
+ schemes = Environment.extra_schemes
40
+ scheme = params[:scheme] || Environment.scheme
41
+
40
42
  if schemes.empty?
41
- schemes = Environment.scheme
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: Environment.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 export_method == "app-store" || export_method == "testFlight"
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(is_from_package: true, configuration: configuration)
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(is_all: true)
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
- DetectUnusedCodeAction.run(
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
- DetectUnusedImageAction.run({})
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.schemes
29
- ENV['SCHEMES_NAME']&.split(",") || []
25
+ def self.extra_schemes
26
+ ENV['EXTRA_SCHEMES_NAME']&.split(",") || []
30
27
  end
31
28
 
32
29
  # 证书描述文件等放置的文件夹名称
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Fastci
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-fastci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - watermelon