fastlane-plugin-fastci 0.0.12 → 0.0.14

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: beca80c5ed38df0f56430ea53056399285eaf4eb465c7918cca00dc6a0e65d75
4
- data.tar.gz: b22ec9b71c62abc98c57860e140781f5cf3753d86498e696b68c3a6e0a131fe6
3
+ metadata.gz: bc2ff5d0f6cd3421e117ad30b091e5138c34b8438d967fcb035cd2383f750041
4
+ data.tar.gz: c41fa51ca79664423bc1b89b5f8248c7963a41db054095e4226aa31a9fc69d1d
5
5
  SHA512:
6
- metadata.gz: 81c9c0f0ff28e37828515264276656128d3e14c8eb4c4b99add923a55e95e8876c59a1376ed4fde9951b4cf680aeff73ba4a25c51226c0208aa7e8c92904068a
7
- data.tar.gz: 468dfc9af7d196b7c3d5360881aefae651a58ec2f240d9233c0063c20d2b91c60e04ef39e6a42d66cfdb2ea3e494f44690ace64239558eb60223fec53f4ff3d6
6
+ metadata.gz: 132de4650487971ef9c853787d5328ff4ac40f270ecb018abd0d42c1a730af4d3ff1a5b77a52d80880137cc206ab245a8ce5422b6f8aebfd5ce19226ffe20a94
7
+ data.tar.gz: 25cba3b8703900c008547f3a2276a8412a5d7df53556cd81c57a4ad7f07e63cff433e13690ccafe2729ac0a967dc56ccb9d22297fe867ef8e0fb52591d013de1
@@ -36,10 +36,19 @@ module Fastlane
36
36
  log_dir = File.expand_path(Constants.BUILD_LOG_DIR)
37
37
  log_file = sh("ls -t #{log_dir}/*.log | head -n 1").strip
38
38
 
39
+ yml_file = File.expand_path(".swiftlint.yml")
40
+
39
41
  analyze_file = File.expand_path(Constants.SWIFTLINT_ANALYZE_FILE)
40
42
 
41
43
  if is_all
42
- sh "swiftlint analyze --compiler-log-path #{log_file} > #{analyze_file} || true"
44
+ sh("
45
+ swiftlint analyze \
46
+ --quiet \
47
+ --config #{yml_file} \
48
+ --compiler-log-path #{log_file} \
49
+ --force-exclude \
50
+ > #{analyze_file} || true
51
+ ")
43
52
  else
44
53
  commit_hash = params[:commit_hash] || read_cached_txt(Constants.COMMIT_HASH_FILE)
45
54
  swift_files = CommonHelper.get_git_modified_swift_files(commit_hash)
@@ -50,7 +59,15 @@ module Fastlane
50
59
  end
51
60
 
52
61
  files_to_analyze = swift_files.join(" ")
53
- sh "swiftlint analyze --compiler-log-path #{log_file} #{files_to_analyze} > #{analyze_file} || true"
62
+ sh("
63
+ swiftlint analyze \
64
+ --quiet \
65
+ --config #{yml_file} \
66
+ --compiler-log-path #{log_file} \
67
+ #{files_to_analyze} \
68
+ --force-exclude \
69
+ > #{analyze_file} || true
70
+ ")
54
71
  end
55
72
 
56
73
  # 输出代码分析报告
@@ -175,7 +175,6 @@ module Fastlane
175
175
  configuration: configuration
176
176
  )
177
177
  # 结果复制到桌面
178
- FileUtils.cp(SWIFTLINT_HTML_FILE, target_path)
179
178
  FileUtils.cp(SWIFTLINT_ANALYZE_HTML_FILE, target_path)
180
179
  UI.message("*************| 代码分析完成 |*************")
181
180
  else
@@ -7,7 +7,7 @@ module Fastlane
7
7
  class UploadStoreAction < Action
8
8
  def self.run(params)
9
9
 
10
- release_notes = JSON.parse(params[:release_notes] || "") rescue ""
10
+ release_notes = JSON.parse(params[:release_notes] || "") rescue nil
11
11
 
12
12
  other_action.app_store_connect_api_key(
13
13
  key_id: Environment.connect_key_id,
@@ -24,16 +24,24 @@ module Fastlane
24
24
  )
25
25
  else
26
26
  UI.message("*************| 开始上传 AppStore |*************")
27
- other_action.upload_to_app_store(
27
+
28
+ # 构建上传参数,只有当 release_notes 有效时才添加
29
+ upload_options = {
28
30
  skip_metadata: false,
29
31
  skip_screenshots: true,
30
32
  run_precheck_before_submit: false,
31
33
  precheck_include_in_app_purchases: false,
32
34
  force: true,
33
35
  submit_for_review: false,
34
- automatic_release: false,
35
- release_notes: release_notes
36
- )
36
+ automatic_release: false
37
+ }
38
+
39
+ # 只有当 release_notes 不为 nil 且不为空时才添加
40
+ if release_notes && !release_notes.empty?
41
+ upload_options[:release_notes] = release_notes
42
+ end
43
+
44
+ other_action.upload_to_app_store(upload_options)
37
45
  end
38
46
  end
39
47
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Fastci
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.14"
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.12
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - watermelon