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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de47d079b6f45ac92b63acc4290149d8c43908a0b203e9647cfbc3a72d1e4d5a
4
- data.tar.gz: 82e275589197111036d99bdf6a6e849e50ed7858e91b82bece9324f48e6b213e
3
+ metadata.gz: faf1e468abfff98b16e2557cddb145dabe01b80b28c241b1aab2acb5327fb1f4
4
+ data.tar.gz: 4617a95f8a655b293a04908f5b85647a59933b880187e15811c31b421b8086dc
5
5
  SHA512:
6
- metadata.gz: 0753ce02d14ccf66ec92fd094a221fcff8bd6bcdb02c71d9df90e7e2b0e43ee5381fc19fbe0221076f929e946e5e37cbb917e328621703968aab89e68b7f665c
7
- data.tar.gz: 70bdf869a8342ea4f71a4d4f76a9fe7f0b08f20594dff1f7528e18eec8e946a8204d8def1c2cac9775f35a974105f0b587ff11dcde49a4aa3025a857b642f205
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 = "#{Environment.scheme}_#{export_method}_#{version}_#{build}.ipa"
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: export_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
- other_action.upload_store(release_notes: release_notes)
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 && export_method != "app-store"
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 && export_method != "app-store"
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 && export_method != "app-store"
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 && export_method != "app-store"
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
@@ -13,6 +13,7 @@ module Fastlane
13
13
  api_token: Environment.fir_api_token,
14
14
  password: Environment.fir_password,
15
15
  changelog: params[:changelog],
16
+ switch_to_qiniu: true
16
17
  )
17
18
 
18
19
  return firinfo
@@ -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
- other_action.upload_to_app_store(
21
- skip_metadata: false,
22
- skip_screenshots: true,
23
- run_precheck_before_submit: false,
24
- precheck_include_in_app_purchases: false,
25
- force: true,
26
- submit_for_review: false,
27
- automatic_release: false,
28
- release_notes: release_notes
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
@@ -17,7 +17,7 @@ module Fastlane
17
17
  ENV['TARGET_NAME']
18
18
  end
19
19
  def self.workspace
20
- ENV['WORKSPACE']
20
+ ENV['WORKSPACE_NAME']
21
21
  end
22
22
  def self.bundleID
23
23
  ENV['BUNDLE_ID']
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Fastci
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.10"
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.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - watermelon