fastlane-plugin-fastci 0.0.6 → 0.0.8

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: 1ec73525d2fc7e5ec78f87ea1636db7114910582cb44eda3408bc3bde430751b
4
- data.tar.gz: 2b70526a319ba2919c7e88dbe44efd0b36a34a4f31be9e7f4112d897f422c635
3
+ metadata.gz: de47d079b6f45ac92b63acc4290149d8c43908a0b203e9647cfbc3a72d1e4d5a
4
+ data.tar.gz: 82e275589197111036d99bdf6a6e849e50ed7858e91b82bece9324f48e6b213e
5
5
  SHA512:
6
- metadata.gz: db85d8ef2ace70c0354e1bf7807e656e02cef23d8a99f8cf5dd2b9340decd746880370651057a75e3484abd3116fe5fc393ef93ad0a220dccca72242a8ce13c4
7
- data.tar.gz: 4c265130006c89b34266d34adaf983ef0c0d4b00bb49d17de1430958a818465bb0e8c1aa7ad1fb64ddbf73526ed54b2bb5c249a3f4fd307e1d73640ed2ff5e38
6
+ metadata.gz: 0753ce02d14ccf66ec92fd094a221fcff8bd6bcdb02c71d9df90e7e2b0e43ee5381fc19fbe0221076f929e946e5e37cbb917e328621703968aab89e68b7f665c
7
+ data.tar.gz: 70bdf869a8342ea4f71a4d4f76a9fe7f0b08f20594dff1f7528e18eec8e946a8204d8def1c2cac9775f35a974105f0b587ff11dcde49a4aa3025a857b642f205
data/README.md CHANGED
@@ -7,8 +7,6 @@
7
7
  简单快速的集成,5 分钟即可上手。
8
8
  配合 Jenkins 实现高度自定义。
9
9
 
10
- 目前还在 Beta 测试阶段!!!
11
-
12
10
  ---
13
11
 
14
12
  ## 安装方法
@@ -27,8 +25,9 @@
27
25
 
28
26
  ## 使用方法
29
27
 
30
- 参考 [` Fastfile `](fastlane/Fastfile) 和 [` .env.default `](fastlane/.env.default) 替换项目内 fastlane 文件夹下文件。
31
- 然后终端进入项目根目录就可以使用 ` fastlane `
28
+ 参考 [` Fastfile `](fastlane/Fastfile) 和 [` .env.default `](fastlane/.env.default) 替换项目内 fastlane 文件夹下文件;
29
+ 项目根目录新建 ` PACKAGE_FILE_FOLDER_NAME ` 配置对应名字文件夹,将描述文件、p12 证书、p8 密钥等文件放入该文件夹下。
30
+ 然后终端进入项目根目录即可使用 ` fastlane `
32
31
 
33
32
 
34
33
  ### 使用后会在项目根目录生成文件夹
@@ -63,7 +62,8 @@ package(
63
62
  is_analyze_swiftlint: false, # 是否代码分析
64
63
  is_detect_duplicity_code: false, # 是否检测重复代码
65
64
  is_detect_unused_code: false, # 是否检测未使用代码
66
- is_detect_unused_image: false # 是否检测未使用图片
65
+ is_detect_unused_image: false, # 是否检测未使用图片
66
+ changelog: options[:changelog], # fir 更新日志
67
67
  release_notes: options[:release_notes] # 配合 jenkins 传参上传 appstore 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串
68
68
  )
69
69
  ```
@@ -8,7 +8,7 @@ module Fastlane
8
8
  def self.run(params)
9
9
  UI.message("*************| 开始安装 p12 证书 |*************")
10
10
 
11
- certificate_paths = Dir.glob(File.expand_path("#{Environment.certificate_folder_name}/*.p12"))
11
+ certificate_paths = Dir.glob(File.expand_path("#{Environment.package_file_folder_name}/*.p12"))
12
12
  certificate_paths.each do |path|
13
13
  other_action.import_certificate(
14
14
  certificate_path: path,
@@ -8,7 +8,7 @@ module Fastlane
8
8
  def self.run(params)
9
9
  UI.message("*************| 开始安装 provisioningProfile |*************")
10
10
 
11
- provisioning_profile_paths = Dir.glob(File.expand_path("#{Environment.provisioningProfile_folder_name}/*.mobileprovision"))
11
+ provisioning_profile_paths = Dir.glob(File.expand_path("#{Environment.package_file_folder_name}/*.mobileprovision"))
12
12
  provisioning_profile_paths.each do |path|
13
13
  other_action.install_provisioning_profile(
14
14
  path: path
@@ -79,7 +79,8 @@ module Fastlane
79
79
 
80
80
  UI.message("*************| 开始打包 |*************")
81
81
 
82
- other_action.gym(
82
+ # 根据是否自动更新描述文件来设置不同的打包参数
83
+ gym_options = {
83
84
  clean: true,
84
85
  silent: true,
85
86
  workspace: Environment.workspace,
@@ -89,10 +90,17 @@ module Fastlane
89
90
  output_name: ipaName,
90
91
  output_directory: Constants.IPA_OUTPUT_DIR,
91
92
  export_options: {
92
- method: export_method,
93
- provisioningProfiles: provisioningProfiles_map
93
+ method: export_method
94
94
  }
95
- )
95
+ }
96
+
97
+ if Environment.is_auto_update_provisioning
98
+ gym_options[:xcargs] = '-allowProvisioningUpdates'
99
+ else
100
+ gym_options[:export_options][:provisioningProfiles] = provisioningProfiles_map
101
+ end
102
+
103
+ other_action.gym(gym_options)
96
104
 
97
105
  UI.message("*************| 打包完成 |*************")
98
106
 
@@ -140,7 +148,9 @@ module Fastlane
140
148
 
141
149
  # 上传 fir
142
150
  if CommonHelper.is_validate_string(Environment.fir_api_token)
143
- fir_upload_info = other_action.upload_fir()
151
+ fir_upload_info = other_action.upload_fir(
152
+ changelog: params[:changelog]
153
+ )
144
154
  download_url = fir_upload_info[:download_url]
145
155
 
146
156
  if CommonHelper.is_validate_string(download_url)
@@ -283,6 +293,12 @@ module Fastlane
283
293
  default_value: false,
284
294
  type: Boolean
285
295
  ),
296
+ FastlaneCore::ConfigItem.new(
297
+ key: :changelog,
298
+ description: "更新日志",
299
+ optional: true,
300
+ type: String
301
+ ),
286
302
  FastlaneCore::ConfigItem.new(
287
303
  key: :release_notes,
288
304
  description: "更新文案, 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串",
@@ -12,6 +12,7 @@ module Fastlane
12
12
  firinfo = other_action.fir_cli(
13
13
  api_token: Environment.fir_api_token,
14
14
  password: Environment.fir_password,
15
+ changelog: params[:changelog],
15
16
  )
16
17
 
17
18
  return firinfo
@@ -22,7 +23,14 @@ module Fastlane
22
23
  end
23
24
 
24
25
  def self.available_options
25
- []
26
+ [
27
+ FastlaneCore::ConfigItem.new(
28
+ key: :changelog,
29
+ description: "更新日志",
30
+ optional: true,
31
+ type: String
32
+ ),
33
+ ]
26
34
  end
27
35
 
28
36
  def self.is_supported?(platform)
@@ -13,13 +13,15 @@ module Fastlane
13
13
  other_action.app_store_connect_api_key(
14
14
  key_id: Environment.connect_key_id,
15
15
  issuer_id: Environment.connect_issuer_id,
16
- key_filepath: File.expand_path("./AuthKey_#{Environment.connect_key_id}.p8"),
16
+ key_filepath: File.expand_path("#{Environment.package_file_folder_name}/AuthKey_#{Environment.connect_key_id}.p8"),
17
17
  duration: 1200, # optional (maximum 1200)
18
18
  in_house: false # optional but may be required if using match/sigh
19
19
  )
20
20
  other_action.upload_to_app_store(
21
21
  skip_metadata: false,
22
22
  skip_screenshots: true,
23
+ run_precheck_before_submit: false,
24
+ precheck_include_in_app_purchases: false,
23
25
  force: true,
24
26
  submit_for_review: false,
25
27
  automatic_release: false,
@@ -29,10 +29,16 @@ module Fastlane
29
29
  ENV['SCHEMES_NAME']&.split(",") || []
30
30
  end
31
31
 
32
- # 描述文件配置
33
- def self.provisioningProfile_folder_name
34
- ENV['PROFILE_FOLDER_NAME']
32
+ # 证书描述文件等放置的文件夹名称
33
+ def self.package_file_folder_name
34
+ ENV['PACKAGE_FILE_FOLDER_NAME']
35
+ end
36
+ # 是否自动更新描述文件
37
+ def self.is_auto_update_provisioning
38
+ ENV['IS_AUTO_UPDATE_PROVISIONING'] == "true"
35
39
  end
40
+
41
+ # 描述文件配置
36
42
  def self.provisioningProfiles_development
37
43
  ENV['PROFILE_DEVELOPMENT']
38
44
  end
@@ -53,9 +59,6 @@ module Fastlane
53
59
  end
54
60
 
55
61
  # p12 证书配置
56
- def self.certificate_folder_name
57
- ENV['PROFILE_FOLDER_NAME']
58
- end
59
62
  def self.certificate_development
60
63
  ENV['CERTIFICATE_DEVELOPMENT']
61
64
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Fastci
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.8"
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.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - watermelon