fastlane-plugin-fastci 0.0.4 → 0.0.6
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/README.md +2 -1
- data/lib/fastlane/plugin/fastci/actions/install_certificate_action.rb +1 -1
- data/lib/fastlane/plugin/fastci/actions/install_profile_action.rb +1 -1
- data/lib/fastlane/plugin/fastci/actions/package_action.rb +34 -15
- data/lib/fastlane/plugin/fastci/actions/upload_fir_action.rb +38 -0
- data/lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb +1 -9
- data/lib/fastlane/plugin/fastci/actions/upload_store_action.rb +5 -3
- data/lib/fastlane/plugin/fastci/helper/dingding_helper.rb +27 -0
- data/lib/fastlane/plugin/fastci/helper/environment.rb +8 -0
- data/lib/fastlane/plugin/fastci/helper/fir_helper.rb +29 -0
- data/lib/fastlane/plugin/fastci/version.rb +1 -1
- metadata +20 -4
- data/lib/fastlane/plugin/fastci/actions/noti_dingding_action.rb +0 -51
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ec73525d2fc7e5ec78f87ea1636db7114910582cb44eda3408bc3bde430751b
|
|
4
|
+
data.tar.gz: 2b70526a319ba2919c7e88dbe44efd0b36a34a4f31be9e7f4112d897f422c635
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db85d8ef2ace70c0354e1bf7807e656e02cef23d8a99f8cf5dd2b9340decd746880370651057a75e3484abd3116fe5fc393ef93ad0a220dccca72242a8ce13c4
|
|
7
|
+
data.tar.gz: 4c265130006c89b34266d34adaf983ef0c0d4b00bb49d17de1430958a818465bb0e8c1aa7ad1fb64ddbf73526ed54b2bb5c249a3f4fd307e1d73640ed2ff5e38
|
data/README.md
CHANGED
|
@@ -48,7 +48,7 @@ fastlane_cache/ # 插件缓存文件夹
|
|
|
48
48
|
|
|
49
49
|
### 1. 自动打包
|
|
50
50
|
功能:自动编译并导出 ipa 包,支持多种打包方式和集成多项检查。
|
|
51
|
-
生成完的 ipa 会放在桌面上,非 ` app-store `
|
|
51
|
+
生成完的 ipa 会放在桌面上,非 ` app-store ` 配置了蒲公英或 fir 参数会自动上传蒲公英或 fir` app-store ` 配置了商店参数会自动上传商店。
|
|
52
52
|
|
|
53
53
|
` build `: 不指定的话内部有递增逻辑,格式为 ` 20250905.15(日期+当天包的次数) `
|
|
54
54
|
|
|
@@ -64,6 +64,7 @@ package(
|
|
|
64
64
|
is_detect_duplicity_code: false, # 是否检测重复代码
|
|
65
65
|
is_detect_unused_code: false, # 是否检测未使用代码
|
|
66
66
|
is_detect_unused_image: false # 是否检测未使用图片
|
|
67
|
+
release_notes: options[:release_notes] # 配合 jenkins 传参上传 appstore 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串
|
|
67
68
|
)
|
|
68
69
|
```
|
|
69
70
|
|
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
|
11
11
|
certificate_paths = Dir.glob(File.expand_path("#{Environment.certificate_folder_name}/*.p12"))
|
|
12
12
|
certificate_paths.each do |path|
|
|
13
13
|
other_action.import_certificate(
|
|
14
|
-
certificate_path:
|
|
14
|
+
certificate_path: path,
|
|
15
15
|
certificate_password: "#{Environment.certificate_password}",
|
|
16
16
|
keychain_name: "login.keychain",
|
|
17
17
|
keychain_password: "#{Environment.keychain_password}"
|
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
|
11
11
|
provisioning_profile_paths = Dir.glob(File.expand_path("#{Environment.provisioningProfile_folder_name}/*.mobileprovision"))
|
|
12
12
|
provisioning_profile_paths.each do |path|
|
|
13
13
|
other_action.install_provisioning_profile(
|
|
14
|
-
path:
|
|
14
|
+
path: path
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -18,6 +18,7 @@ module Fastlane
|
|
|
18
18
|
is_detect_duplicity_code = params[:is_detect_duplicity_code] || false
|
|
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
|
+
release_notes = params[:release_notes] || ""
|
|
21
22
|
if export_method == "app-store"
|
|
22
23
|
configuration = "Release"
|
|
23
24
|
end
|
|
@@ -27,9 +28,9 @@ module Fastlane
|
|
|
27
28
|
FileUtils.rm_rf(Dir.glob("#{Constants.IPA_OUTPUT_DIR}/*"))
|
|
28
29
|
|
|
29
30
|
# 安装证书
|
|
30
|
-
|
|
31
|
+
other_action.install_certificate()
|
|
31
32
|
# 安装 provisioningProfile
|
|
32
|
-
|
|
33
|
+
other_action.install_profile()
|
|
33
34
|
|
|
34
35
|
scheme = Environment.scheme
|
|
35
36
|
|
|
@@ -115,27 +116,39 @@ module Fastlane
|
|
|
115
116
|
|
|
116
117
|
if export_method == "app-store"
|
|
117
118
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-打包完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
118
|
-
|
|
119
|
+
DingdingHelper.sendMarkdown(notiText)
|
|
119
120
|
|
|
120
121
|
if CommonHelper.is_validate_string(Environment.connect_key_id) && CommonHelper.is_validate_string(Environment.connect_issuer_id)
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
other_action.upload_store(release_notes: release_notes)
|
|
123
124
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-上传完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
124
|
-
|
|
125
|
+
DingdingHelper.sendMarkdown(notiText)
|
|
125
126
|
end
|
|
126
127
|
else
|
|
127
|
-
# 上传蒲公英
|
|
128
|
-
pgy_upload_info = UploadPgyAction.run(
|
|
129
|
-
"ipa_path": ipa_path
|
|
130
|
-
)
|
|
131
|
-
qrCode = pgy_upload_info["buildQRCodeURL"]
|
|
132
|
-
|
|
133
128
|
# 钉钉通知
|
|
134
129
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-打包完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
|
|
131
|
+
# 上传蒲公英
|
|
132
|
+
if CommonHelper.is_validate_string(Environment.pgy_api_key)
|
|
133
|
+
pgy_upload_info = other_action.upload_pgy()
|
|
134
|
+
qrCode = pgy_upload_info["buildQRCodeURL"]
|
|
135
|
+
|
|
136
|
+
if CommonHelper.is_validate_string(qrCode)
|
|
137
|
+
notiText << "\n\n⬇️⬇️⬇️ 扫码安装 ⬇️⬇️⬇️\n\n\n密码: #{Environment.pgy_password}\n"
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# 上传 fir
|
|
142
|
+
if CommonHelper.is_validate_string(Environment.fir_api_token)
|
|
143
|
+
fir_upload_info = other_action.upload_fir()
|
|
144
|
+
download_url = fir_upload_info[:download_url]
|
|
145
|
+
|
|
146
|
+
if CommonHelper.is_validate_string(download_url)
|
|
147
|
+
notiText << "\n\n⬇️⬇️⬇️ 点击链接安装 ⬇️⬇️⬇️\n\n\n密码: #{Environment.fir_password}\n[_点击下载_](#{download_url})"
|
|
148
|
+
end
|
|
137
149
|
end
|
|
138
|
-
|
|
150
|
+
|
|
151
|
+
DingdingHelper.sendMarkdown(notiText)
|
|
139
152
|
end
|
|
140
153
|
|
|
141
154
|
# 代码分析
|
|
@@ -188,7 +201,7 @@ module Fastlane
|
|
|
188
201
|
is_detect_unused_image
|
|
189
202
|
# 钉钉通知
|
|
190
203
|
notiText = "🚀🚀🚀🚀🚀🚀\n\n#{scheme}-iOS-代码检查完成\n\n#{version}_#{build}_#{export_method}\n\n🚀🚀🚀🚀🚀🚀"
|
|
191
|
-
|
|
204
|
+
DingdingHelper.sendMarkdown(notiText)
|
|
192
205
|
else
|
|
193
206
|
UI.message("*************| 跳过代码检查 |*************")
|
|
194
207
|
end
|
|
@@ -270,6 +283,12 @@ module Fastlane
|
|
|
270
283
|
default_value: false,
|
|
271
284
|
type: Boolean
|
|
272
285
|
),
|
|
286
|
+
FastlaneCore::ConfigItem.new(
|
|
287
|
+
key: :release_notes,
|
|
288
|
+
description: "更新文案, 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串",
|
|
289
|
+
optional: true,
|
|
290
|
+
type: String
|
|
291
|
+
)
|
|
273
292
|
]
|
|
274
293
|
end
|
|
275
294
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
require 'fastlane/action'
|
|
2
|
+
require 'fastlane/plugin/fir_cli'
|
|
3
|
+
include Fastlane::Helper
|
|
4
|
+
|
|
5
|
+
module Fastlane
|
|
6
|
+
module Actions
|
|
7
|
+
# 上传Fir
|
|
8
|
+
class UploadFirAction < Action
|
|
9
|
+
def self.run(params)
|
|
10
|
+
UI.message("*************| 开始上传Fir |*************")
|
|
11
|
+
|
|
12
|
+
firinfo = other_action.fir_cli(
|
|
13
|
+
api_token: Environment.fir_api_token,
|
|
14
|
+
password: Environment.fir_password,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
return firinfo
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.description
|
|
21
|
+
"上传Fir"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.available_options
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.is_supported?(platform)
|
|
29
|
+
platform == :ios
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.category
|
|
33
|
+
:building
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -9,15 +9,7 @@ module Fastlane
|
|
|
9
9
|
def self.run(params)
|
|
10
10
|
UI.message("*************| 开始上传蒲公英 |*************")
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
UI.message("*************| 没有配置 pgy_api_key |*************")
|
|
14
|
-
return
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
ipa_path = params[:ipa_path] || ""
|
|
18
|
-
|
|
19
|
-
pgyinfo = PgyerAction.run(
|
|
20
|
-
ipa: ipa_path,
|
|
12
|
+
pgyinfo = other_action.pgyer(
|
|
21
13
|
api_key: Environment.pgy_api_key,
|
|
22
14
|
password: Environment.pgy_password,
|
|
23
15
|
install_type: "2"
|
|
@@ -8,6 +8,8 @@ module Fastlane
|
|
|
8
8
|
def self.run(params)
|
|
9
9
|
UI.message("*************| 开始上传 AppStore |*************")
|
|
10
10
|
|
|
11
|
+
release_notes = JSON.parse(params[:release_notes] || "") rescue ""
|
|
12
|
+
|
|
11
13
|
other_action.app_store_connect_api_key(
|
|
12
14
|
key_id: Environment.connect_key_id,
|
|
13
15
|
issuer_id: Environment.connect_issuer_id,
|
|
@@ -21,7 +23,7 @@ module Fastlane
|
|
|
21
23
|
force: true,
|
|
22
24
|
submit_for_review: false,
|
|
23
25
|
automatic_release: false,
|
|
24
|
-
release_notes:
|
|
26
|
+
release_notes: release_notes
|
|
25
27
|
)
|
|
26
28
|
|
|
27
29
|
end
|
|
@@ -34,9 +36,9 @@ module Fastlane
|
|
|
34
36
|
[
|
|
35
37
|
FastlaneCore::ConfigItem.new(
|
|
36
38
|
key: :release_notes,
|
|
37
|
-
description: "更新文案, 格式为 { \"zh-Hans\"
|
|
39
|
+
description: "更新文案, 格式为 { \"zh-Hans\": \"修复问题\", \"en-US\": \"bugfix\"} JSON 字符串",
|
|
38
40
|
optional: false,
|
|
39
|
-
type:
|
|
41
|
+
type: String
|
|
40
42
|
)
|
|
41
43
|
]
|
|
42
44
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
|
2
|
+
require 'fileutils'
|
|
3
|
+
|
|
4
|
+
module Fastlane
|
|
5
|
+
module Helper
|
|
6
|
+
class DingdingHelper
|
|
7
|
+
|
|
8
|
+
def self.sendMarkdown(text)
|
|
9
|
+
UI.message("*************| 开始钉钉消息通知 |*************")
|
|
10
|
+
|
|
11
|
+
curl = %Q{
|
|
12
|
+
curl 'https://oapi.dingtalk.com/robot/send?access_token=#{Environment.dingdingToken}' \
|
|
13
|
+
-H 'Content-Type:application/json' \
|
|
14
|
+
-d '{
|
|
15
|
+
"msgtype":"markdown",
|
|
16
|
+
"markdown":{
|
|
17
|
+
"title":"#{Environment.scheme} 打包通知",
|
|
18
|
+
"text":"#{text}"
|
|
19
|
+
}
|
|
20
|
+
}'
|
|
21
|
+
}
|
|
22
|
+
system curl
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
|
2
|
+
require 'fastlane/plugin/fir_cli'
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
|
|
5
|
+
module Fastlane
|
|
6
|
+
module Helper
|
|
7
|
+
class FirHelper
|
|
8
|
+
|
|
9
|
+
# def self.get_download_url(download_domain, short)
|
|
10
|
+
# "https://#{download_domain}/#{short}"
|
|
11
|
+
# end
|
|
12
|
+
|
|
13
|
+
# def self.get_qrcode(download_url)
|
|
14
|
+
# filePath = File.expand_path(Constants.IPA_OUTPUT_DIR)
|
|
15
|
+
# qrcode_path = "#{filePath}/fir-qrcode.png"
|
|
16
|
+
# generate_rqrcode(download_url, qrcode_path)
|
|
17
|
+
|
|
18
|
+
# qrcode_path
|
|
19
|
+
# end
|
|
20
|
+
|
|
21
|
+
# def self.generate_rqrcode(string, png_file_path)
|
|
22
|
+
# qrcode = ::RQRCode::QRCode.new(string.to_s)
|
|
23
|
+
# qrcode.as_png(size: 500, border_modules: 2, file: png_file_path)
|
|
24
|
+
# png_file_path
|
|
25
|
+
# end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
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.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- watermelon
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.2
|
|
18
|
+
version: 0.3.2
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.2
|
|
25
|
+
version: 0.3.2
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: fastlane-plugin-versioning
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: 0.7.1
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: fastlane-plugin-fir_cli
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 2.0.21
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 2.0.21
|
|
40
54
|
email: watermelon_lp@163.com
|
|
41
55
|
executables: []
|
|
42
56
|
extensions: []
|
|
@@ -51,14 +65,16 @@ files:
|
|
|
51
65
|
- lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb
|
|
52
66
|
- lib/fastlane/plugin/fastci/actions/install_certificate_action.rb
|
|
53
67
|
- lib/fastlane/plugin/fastci/actions/install_profile_action.rb
|
|
54
|
-
- lib/fastlane/plugin/fastci/actions/noti_dingding_action.rb
|
|
55
68
|
- lib/fastlane/plugin/fastci/actions/package_action.rb
|
|
56
69
|
- lib/fastlane/plugin/fastci/actions/update_build_number_action.rb
|
|
70
|
+
- lib/fastlane/plugin/fastci/actions/upload_fir_action.rb
|
|
57
71
|
- lib/fastlane/plugin/fastci/actions/upload_pgy_action.rb
|
|
58
72
|
- lib/fastlane/plugin/fastci/actions/upload_store_action.rb
|
|
59
73
|
- lib/fastlane/plugin/fastci/helper/common_helper.rb
|
|
60
74
|
- lib/fastlane/plugin/fastci/helper/constants.rb
|
|
75
|
+
- lib/fastlane/plugin/fastci/helper/dingding_helper.rb
|
|
61
76
|
- lib/fastlane/plugin/fastci/helper/environment.rb
|
|
77
|
+
- lib/fastlane/plugin/fastci/helper/fir_helper.rb
|
|
62
78
|
- lib/fastlane/plugin/fastci/version.rb
|
|
63
79
|
- lib/fastlane/plugin/python/generate_duplicity_code_html.py
|
|
64
80
|
- lib/fastlane/plugin/python/generate_lint_html.py
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
require 'fastlane/action'
|
|
2
|
-
include Fastlane::Helper
|
|
3
|
-
|
|
4
|
-
module Fastlane
|
|
5
|
-
module Actions
|
|
6
|
-
# 钉钉通知
|
|
7
|
-
class NotiDingdingAction < Action
|
|
8
|
-
def self.run(params)
|
|
9
|
-
UI.message("*************| 开始钉钉消息通知 |*************")
|
|
10
|
-
notiText = params[:notiText] || ""
|
|
11
|
-
|
|
12
|
-
curl = %Q{
|
|
13
|
-
curl 'https://oapi.dingtalk.com/robot/send?access_token=#{Environment.dingdingToken}' \
|
|
14
|
-
-H 'Content-Type:application/json' \
|
|
15
|
-
-d '{
|
|
16
|
-
"msgtype":"markdown",
|
|
17
|
-
"markdown":{
|
|
18
|
-
"title":"#{Environment.scheme} 打包通知",
|
|
19
|
-
"text":"#{notiText}"
|
|
20
|
-
}
|
|
21
|
-
}'
|
|
22
|
-
}
|
|
23
|
-
system curl
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.description
|
|
27
|
-
"钉钉通知"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def self.available_options
|
|
31
|
-
[
|
|
32
|
-
FastlaneCore::ConfigItem.new(
|
|
33
|
-
key: :notiText,
|
|
34
|
-
description: "要发送的钉钉通知内容",
|
|
35
|
-
optional: false, # 是否可选
|
|
36
|
-
type: String
|
|
37
|
-
),
|
|
38
|
-
]
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def self.is_supported?(platform)
|
|
42
|
-
platform == :ios
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def self.category
|
|
46
|
-
:notifications
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|