fastlane-plugin-zealot 0.7.1 → 1.0.0
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 +39 -26
- data/lib/fastlane/plugin/zealot/actions/zealot_action.rb +4 -2
- data/lib/fastlane/plugin/zealot/actions/zealot_sync_devices.rb +52 -11
- data/lib/fastlane/plugin/zealot/helper/zealot_helper.rb +1 -4
- data/lib/fastlane/plugin/zealot/version.rb +3 -1
- metadata +9 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59b04577863276205b4f6054d8b7c20c4e60a85978ea43cdc11a823b0fbe2858
|
|
4
|
+
data.tar.gz: 26eaee437c2646a2738099e4dbc9d2466575b9d09534c36789bb893a174ad28e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a74e4133c22f32cc7f5f23db3603dc39f75a9d65446d46c9f2e8f10c24037eda85fd25a2994c18b1b9aaf25472d1ea9cfada37417dbae48956b3e3e6fcd29bf
|
|
7
|
+
data.tar.gz: 1f817bc7ebf12c4a50b495863fa734881d96024a707a4a51964c5049cf35105c6b07bd54bb67779d13a570b0dce8e6fd6c2fb4a3bd957f1d2f627ebffb11933c
|
data/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# fastlane-plugin-zealot
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/fastlane-plugin-zealot)
|
|
4
|
+
[](https://zealot.ews.im/docs/developer-guide/fastlane)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
上传任何应用文件(iPhone、Android,macOS,Windows 和 Linux)到 [Zealot](https://github.com/tryzealot/zealot) 自建 App 分发系统。
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
fastlane-plugin-zealot provides upload app, debug_file and version check actions to [Zealot](https://github.com/tryzealot/zealot).
|
|
8
9
|
|
|
9
|
-
## 快速上手
|
|
10
|
+
## 快速上手 Quick Start
|
|
10
11
|
|
|
11
12
|
这是一个 [_fastlane_](https://github.com/fastlane/fastlane) 插件。如果要使用 `fastlane-plugin-zealot` 可通过下面方法添加到 fastlane 体系中:
|
|
12
13
|
|
|
@@ -20,7 +21,7 @@ $ fastlane add_plugin zealot
|
|
|
20
21
|
|
|
21
22
|
### zealot
|
|
22
23
|
|
|
23
|
-
上传 iOS/Android App 至 Zealot 系统,插件会通过参数和 CI 系统自动获取很多辅助信息。包括但不仅限于:
|
|
24
|
+
上传 iOS (app/ipa)、Android (apk/abb),macOS(Zip 压缩后的 app 文件),Windows(exe)和 Linux App 至 Zealot 系统,插件会通过参数和 CI 系统自动获取很多辅助信息。包括但不仅限于:
|
|
24
25
|
|
|
25
26
|
- 使用 gym 或 gradle 打包生成的 app 文件路径
|
|
26
27
|
- 解析应用获取的应用名称、打包类型
|
|
@@ -202,38 +203,50 @@ end
|
|
|
202
203
|
|
|
203
204
|
### zealot_sync_device
|
|
204
205
|
|
|
205
|
-
同步指定 Apple 开发者账号的设备列表信息到 Zealot,主要是为了让使用者更清晰看到每个设备 udid
|
|
206
|
+
同步指定 Apple 开发者账号的设备列表信息到 Zealot,主要是为了让使用者更清晰看到每个设备 udid 记录的名称,提供两种授权方式:
|
|
207
|
+
|
|
208
|
+
- [Apple API Key 授权](https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file) **强烈推荐**
|
|
209
|
+
- 密码授权
|
|
206
210
|
|
|
207
211
|
#### 参数和返回值
|
|
208
212
|
|
|
209
213
|
```
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
| Key | Description
|
|
214
|
-
|
|
215
|
-
| endpoint | The endpoint of zealot
|
|
216
|
-
| token | The token of user
|
|
217
|
-
| username | The apple id (username) of Apple
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
-
| |
|
|
221
|
-
|
|
|
222
|
-
| |
|
|
223
|
-
| |
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
214
|
+
+---------------+-----------------------------------------------------------------------------+------------------------+---------+
|
|
215
|
+
| zealot_sync_devices Options |
|
|
216
|
+
+---------------+-----------------------------------------------------------------------------+------------------------+---------+
|
|
217
|
+
| Key | Description | Env Var(s) | Default |
|
|
218
|
+
+---------------+-----------------------------------------------------------------------------+------------------------+---------+
|
|
219
|
+
| endpoint | The endpoint of zealot | ZEALOT_ENDPOINT | |
|
|
220
|
+
| token | The token of user | ZEALOT_TOKEN | |
|
|
221
|
+
| username | The apple id (username) of Apple Developer Portal | ZEALOT_USERNAME | * |
|
|
222
|
+
| api_key_path | Path to your App Store Connect API Key JSON file | ZEALOT_API_PATH | |
|
|
223
|
+
| | (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key | | |
|
|
224
|
+
| | -json-file) | | |
|
|
225
|
+
| api_key | Your App Store Connect API Key information | ZEALOT_API_KEY | * |
|
|
226
|
+
| | (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key | | |
|
|
227
|
+
| | -hash-option) | | |
|
|
228
|
+
| team_id | The ID of your Developer Portal team if you're in multiple teams | ZEALOT_APPLE_TEAM_ID | * |
|
|
229
|
+
| team_name | The name of your Developer Portal team if you're in multiple teams | ZEALOT_APPLE_TEAM_NAME | * |
|
|
230
|
+
| platform | The platform to use (optional) | ZEALOT_APPLE_PLATFORM | ios |
|
|
231
|
+
| verify_ssl | Should verify SSL of zealot service | ZEALOT_VERIFY_SSL | true |
|
|
232
|
+
| timeout | Request timeout in seconds | ZEALOT_TIMEOUT | |
|
|
233
|
+
| fail_on_error | Should an error http request cause a failure? (true/false) | ZEALOT_FAIL_ON_ERROR | false |
|
|
234
|
+
+---------------+-----------------------------------------------------------------------------+------------------------+---------+
|
|
231
235
|
```
|
|
232
236
|
|
|
233
237
|
#### 样例
|
|
234
238
|
|
|
235
239
|
```ruby
|
|
236
240
|
lane :sync do
|
|
241
|
+
# 使用 Apple API Key 方式授权,无需密码和二次验证
|
|
242
|
+
zealot_sync_devices(
|
|
243
|
+
endpoint: "...",
|
|
244
|
+
token: "...",
|
|
245
|
+
api_key_path: "/path/to/your/api_key_json_file",
|
|
246
|
+
team_id: "..."
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
# 使用传统的密码授权
|
|
237
250
|
zealot_sync_devices(
|
|
238
251
|
endpoint: "...",
|
|
239
252
|
token: "...",
|
|
@@ -57,7 +57,7 @@ module Fastlane
|
|
|
57
57
|
#####################################################
|
|
58
58
|
|
|
59
59
|
def self.description
|
|
60
|
-
'Upload
|
|
60
|
+
'Upload a application file to Zealot which it provides a self-host over the air server for deployment of Android, iOS, macOS, Windows and Linux apps.'
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def self.available_options
|
|
@@ -81,7 +81,7 @@ module Fastlane
|
|
|
81
81
|
FastlaneCore::ConfigItem.new(key: :file,
|
|
82
82
|
env_name: 'ZEALOT_FILE',
|
|
83
83
|
description: 'The path of app file. Optional if you use the `gym`, `ipa`, `xcodebuild` or `gradle` action. ',
|
|
84
|
-
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir['*.ipa'].last || Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || Dir['*.apk'].last,
|
|
84
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir['*.ipa'].last || Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || Dir['*.apk'].last || Dir['*.exe'].last || Dir['*'].last,
|
|
85
85
|
verify_block: proc do |value|
|
|
86
86
|
UI.user_error!("Couldn't pass empty to file") if value.nil? || value.empty?
|
|
87
87
|
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
|
@@ -96,6 +96,7 @@ module Fastlane
|
|
|
96
96
|
FastlaneCore::ConfigItem.new(key: :changelog,
|
|
97
97
|
env_name: 'ZEALOT_CHANGELOG',
|
|
98
98
|
description: 'The changelog of app',
|
|
99
|
+
default_value: ENV['CI_CHANGELOG'],
|
|
99
100
|
optional: true,
|
|
100
101
|
type: String),
|
|
101
102
|
FastlaneCore::ConfigItem.new(key: :slug,
|
|
@@ -123,6 +124,7 @@ module Fastlane
|
|
|
123
124
|
FastlaneCore::ConfigItem.new(key: :custom_fields,
|
|
124
125
|
env_name: 'ZEALOT_CUSTOM_FIELDS',
|
|
125
126
|
description: 'The key-value hash of custom fields',
|
|
127
|
+
default_value: '[]',
|
|
126
128
|
optional: true,
|
|
127
129
|
type: Array),
|
|
128
130
|
FastlaneCore::ConfigItem.new(key: :password,
|
|
@@ -13,19 +13,37 @@ module Fastlane
|
|
|
13
13
|
def self.run(params)
|
|
14
14
|
require 'spaceship'
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Spaceship.select_team
|
|
16
|
+
UI.warn('Zealot v4.5.0 starts to support Apple developer features to enable automatic synchronization of test devices.')
|
|
17
|
+
UI.warn('Link to view detail: https://zealot.ews.im/docs/user-guide/administrator/apple-team')
|
|
19
18
|
|
|
20
|
-
UI.message('Fetching list of currently registered devices...')
|
|
21
19
|
all_platforms = Set[params[:platform]]
|
|
22
20
|
supported_platforms = all_platforms.select { |platform| self.is_supported?(platform.to_sym) }
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
if (api_token = Spaceship::ConnectAPI::Token.from(hash: params[:api_key], filepath: params[:api_key_path]))
|
|
23
|
+
UI.message('Creating authorization token for App Store Connect API')
|
|
24
|
+
Spaceship::ConnectAPI.token = api_token
|
|
25
|
+
|
|
26
|
+
devices = supported_platforms.flat_map do |platform|
|
|
27
|
+
Spaceship::ConnectAPI::Device.all(filter: { platform: platform == 'ios' ? 'IOS' : 'MAC_OS'})
|
|
28
|
+
end
|
|
29
|
+
else
|
|
30
|
+
username = params[:username]
|
|
31
|
+
UI.message("Login to App Store Connect (#{username})")
|
|
32
|
+
credentials = CredentialsManager::AccountManager.new(user: username)
|
|
33
|
+
Spaceship.login(credentials.user, credentials.password)
|
|
34
|
+
UI.message('Login successful')
|
|
35
|
+
Spaceship.select_team
|
|
36
|
+
|
|
37
|
+
# Fetches all devices includes macOS.
|
|
38
|
+
|
|
39
|
+
devices = supported_platforms.flat_map { |platform| Spaceship::Device.all(mac: platform == 'mac') }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
UI.message('Fetching list of currently registered devices...')
|
|
25
43
|
|
|
26
44
|
print_table(build_table_data(params, devices), title: 'zealot_sync_devices')
|
|
27
45
|
|
|
28
|
-
UI.
|
|
46
|
+
UI.message("Syncing devices to #{params[:endpoint]} ...")
|
|
29
47
|
failed_devices = []
|
|
30
48
|
devices.each do |device|
|
|
31
49
|
begin
|
|
@@ -39,7 +57,7 @@ module Fastlane
|
|
|
39
57
|
|
|
40
58
|
failed = failed_devices.size
|
|
41
59
|
successed = devices.size - failed
|
|
42
|
-
UI.success "Successful Synced devices
|
|
60
|
+
UI.success "Successful Synced devices, success: #{successed}, failed: #{failed}"
|
|
43
61
|
UI.verbose "Failed devices: #{failed_devices}"
|
|
44
62
|
end
|
|
45
63
|
|
|
@@ -48,7 +66,7 @@ module Fastlane
|
|
|
48
66
|
#####################################################
|
|
49
67
|
|
|
50
68
|
def self.description
|
|
51
|
-
'
|
|
69
|
+
'Sync ios devices list to Zealot'
|
|
52
70
|
end
|
|
53
71
|
|
|
54
72
|
def self.available_options
|
|
@@ -66,11 +84,28 @@ module Fastlane
|
|
|
66
84
|
end,
|
|
67
85
|
type: String),
|
|
68
86
|
FastlaneCore::ConfigItem.new(key: :username,
|
|
69
|
-
env_name: '
|
|
87
|
+
env_name: 'ZEALOT_USERNAME',
|
|
70
88
|
description: 'The apple id (username) of Apple Developer Portal',
|
|
71
89
|
default_value_dynamic: true,
|
|
72
90
|
optional: true,
|
|
73
91
|
type: String),
|
|
92
|
+
FastlaneCore::ConfigItem.new(key: :api_key_path,
|
|
93
|
+
env_name: 'ZEALOT_API_PATH',
|
|
94
|
+
description: 'Path to your App Store Connect API Key JSON file (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-json-file)',
|
|
95
|
+
optional: true,
|
|
96
|
+
conflicting_options: [:api_key],
|
|
97
|
+
verify_block: proc do |value|
|
|
98
|
+
UI.user_error!("Couldn't find API key JSON file at path '#{value}'") unless File.exist?(value)
|
|
99
|
+
end),
|
|
100
|
+
FastlaneCore::ConfigItem.new(key: :api_key,
|
|
101
|
+
env_name: 'ZEALOT_API_KEY',
|
|
102
|
+
description: 'Your App Store Connect API Key information (https://docs.fastlane.tools/app-store-connect-api/#using-fastlane-api-key-hash-option)',
|
|
103
|
+
type: Hash,
|
|
104
|
+
default_value: Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::APP_STORE_CONNECT_API_KEY],
|
|
105
|
+
default_value_dynamic: true,
|
|
106
|
+
optional: true,
|
|
107
|
+
sensitive: true,
|
|
108
|
+
conflicting_options: [:api_key_path]),
|
|
74
109
|
FastlaneCore::ConfigItem.new(key: :team_id,
|
|
75
110
|
env_name: 'ZEALOT_APPLE_TEAM_ID',
|
|
76
111
|
description: 'The ID of your Developer Portal team if you\'re in multiple teams',
|
|
@@ -79,7 +114,7 @@ module Fastlane
|
|
|
79
114
|
optional: true,
|
|
80
115
|
type: String,
|
|
81
116
|
verify_block: proc do |value|
|
|
82
|
-
ENV[
|
|
117
|
+
ENV['FASTLANE_TEAM_ID'] = value.to_s
|
|
83
118
|
end),
|
|
84
119
|
FastlaneCore::ConfigItem.new(key: :team_name,
|
|
85
120
|
env_name: 'ZEALOT_APPLE_TEAM_NAME',
|
|
@@ -89,7 +124,7 @@ module Fastlane
|
|
|
89
124
|
optional: true,
|
|
90
125
|
type: String,
|
|
91
126
|
verify_block: proc do |value|
|
|
92
|
-
ENV[
|
|
127
|
+
ENV['FASTLANE_TEAM_NAME'] = value.to_s
|
|
93
128
|
end),
|
|
94
129
|
FastlaneCore::ConfigItem.new(key: :platform,
|
|
95
130
|
env_name: 'ZEALOT_APPLE_PLATFORM',
|
|
@@ -121,6 +156,12 @@ module Fastlane
|
|
|
121
156
|
|
|
122
157
|
def self.example_code
|
|
123
158
|
[
|
|
159
|
+
'zealot_sync_devices(
|
|
160
|
+
endpoint: "...",
|
|
161
|
+
token: "...",
|
|
162
|
+
api_key_path: "...",
|
|
163
|
+
team_id: "..."
|
|
164
|
+
)',
|
|
124
165
|
'zealot_sync_devices(
|
|
125
166
|
endpoint: "...",
|
|
126
167
|
token: "...",
|
|
@@ -41,9 +41,6 @@ module Fastlane
|
|
|
41
41
|
|
|
42
42
|
def upload_app(params)
|
|
43
43
|
form = upload_app_params(params)
|
|
44
|
-
# recommand generate collect changelog plugin: https://github.com/icyleaf/fastlane-plugin-ci_changelog
|
|
45
|
-
form[:changelog] = changelog_raw if changelog_raw = ENV['CICL_CHANGLOG']
|
|
46
|
-
|
|
47
44
|
print_table(form, title: 'zealot', hidden_keys: hidden_keys(params))
|
|
48
45
|
|
|
49
46
|
endpoint = params[:endpoint]
|
|
@@ -55,7 +52,7 @@ module Fastlane
|
|
|
55
52
|
req.body = form
|
|
56
53
|
end
|
|
57
54
|
rescue Faraday::ConnectionFailed
|
|
58
|
-
show_error('Can not connecting to Zealot', params[:fail_on_error])
|
|
55
|
+
show_error('Can not connecting to Zealot service, make sure it be health to upload.', params[:fail_on_error])
|
|
59
56
|
rescue Faraday::TimeoutError
|
|
60
57
|
show_error('Uploading build to Zealot timed out ⏳', params[:fail_on_error])
|
|
61
58
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-zealot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- icyleaf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -156,14 +156,14 @@ dependencies:
|
|
|
156
156
|
requirements:
|
|
157
157
|
- - ">="
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
|
-
version: 2.
|
|
159
|
+
version: 2.172.0
|
|
160
160
|
type: :development
|
|
161
161
|
prerelease: false
|
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
163
|
requirements:
|
|
164
164
|
- - ">="
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
|
-
version: 2.
|
|
166
|
+
version: 2.172.0
|
|
167
167
|
description:
|
|
168
168
|
email: icyleaf.cn@gmail.com
|
|
169
169
|
executables: []
|
|
@@ -179,7 +179,7 @@ files:
|
|
|
179
179
|
- lib/fastlane/plugin/zealot/actions/zealot_version_check.rb
|
|
180
180
|
- lib/fastlane/plugin/zealot/helper/zealot_helper.rb
|
|
181
181
|
- lib/fastlane/plugin/zealot/version.rb
|
|
182
|
-
homepage: https://github.com/
|
|
182
|
+
homepage: https://github.com/tryzealot/fastlane-plugin-zealot
|
|
183
183
|
licenses:
|
|
184
184
|
- MIT
|
|
185
185
|
metadata: {}
|
|
@@ -198,9 +198,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
198
198
|
- !ruby/object:Gem::Version
|
|
199
199
|
version: '0'
|
|
200
200
|
requirements: []
|
|
201
|
-
rubygems_version: 3.
|
|
201
|
+
rubygems_version: 3.5.22
|
|
202
202
|
signing_key:
|
|
203
203
|
specification_version: 4
|
|
204
|
-
summary: Upload IPA/APK/dSYM/Proguard files to Zealot which it provides
|
|
205
|
-
Over The Air Server for deployment of Android
|
|
204
|
+
summary: Upload IPA/APK/AAB/EXE/APP/ZIP/dSYM/Proguard files to Zealot which it provides
|
|
205
|
+
a self-host Over The Air Server for deployment of Android, iOS, macOS, Windows and
|
|
206
|
+
Linux apps.
|
|
206
207
|
test_files: []
|