fastlane-plugin-pgyer 0.2.8 → 0.3.1
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 +21 -1
- data/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb +54 -3
- data/lib/fastlane/plugin/pgyer/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 741284528b903fbc1a290128b51cbed6edaa428d734da99514a3e15e353d0534
|
4
|
+
data.tar.gz: 6fe64045b3a0fecb3da47ed3cc8a7d3915736a0e85f47a4bcb5386f9a4a19373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94cef84dc0babdac14f62ed7d4ea53a73ff72bf788f463517743c921a427c30c8c6fc82a69ce4fbb5c0f19e922d457dedd5c4e31baed3402323b8960ae3005a7
|
7
|
+
data.tar.gz: 4eeef611fdc5c90845577d22d7f1f541598313a19776c459c032ea483d3c1f4b3a41ef05700facad77f82f5193491693668488c8c7202e9db21d9d2ebc747397
|
data/README.md
CHANGED
@@ -66,7 +66,7 @@ end
|
|
66
66
|
```
|
67
67
|
|
68
68
|
Set a version update description for App:
|
69
|
-
|
69
|
+
acd88a1a52f0818dc7923150c4d86f08
|
70
70
|
```
|
71
71
|
lane :beta do
|
72
72
|
gym
|
@@ -95,6 +95,22 @@ end
|
|
95
95
|
```
|
96
96
|
|
97
97
|
|
98
|
+
HAP file upload
|
99
|
+
|
100
|
+
pgyer supports hap file to upload, use params hap to specify the absolute file path.
|
101
|
+
|
102
|
+
```ruby
|
103
|
+
lane :beta do
|
104
|
+
gym
|
105
|
+
pgyer(api_key: "7f15xxxxxxxxxxxxxxxxxx141", hap: "xxxx")
|
106
|
+
end
|
107
|
+
```
|
108
|
+
|
109
|
+
or in bash
|
110
|
+
```bash
|
111
|
+
fastlane run pgyer api_key:7f15xxxxxxxxxxxxxxxxxx141 hap:xxx.hap
|
112
|
+
```
|
113
|
+
|
98
114
|
|
99
115
|
|
100
116
|
And more params
|
@@ -115,8 +131,12 @@ install_end_date: The value is a string of characters, such as 2018-12-31.
|
|
115
131
|
|
116
132
|
channel: Need to update the specified channel of the download short link, can specify only one channel, string type, such as: ABCD. Specifies channel uploads. If you do not have one, do not use this parameter.
|
117
133
|
|
134
|
+
user_download_file_name: The name of the file downloaded by the user, the string type, such as: test.apk.
|
135
|
+
|
118
136
|
save_uploaded_info_json: (true or false, default to false) Whether to save the information returned by the API interface to a json file.
|
119
137
|
|
138
|
+
|
139
|
+
|
120
140
|
```
|
121
141
|
## Run tests for this plugin
|
122
142
|
|
@@ -12,13 +12,14 @@ module Fastlane
|
|
12
12
|
build_file = [
|
13
13
|
params[:ipa],
|
14
14
|
params[:apk],
|
15
|
+
params[:hap],
|
15
16
|
].detect { |e| !e.to_s.empty? }
|
16
17
|
|
17
18
|
if build_file.nil?
|
18
19
|
UI.user_error!("You have to provide a build file")
|
19
20
|
end
|
20
21
|
|
21
|
-
type = params
|
22
|
+
type = get_type(params)
|
22
23
|
|
23
24
|
UI.message "build_file: #{build_file}, type: #{type}"
|
24
25
|
|
@@ -100,10 +101,20 @@ module Fastlane
|
|
100
101
|
UI.user_error!("Get token is failed")
|
101
102
|
end
|
102
103
|
content_type = type == "android" ? "application/vnd.android.package-archive" : "application/octet-stream"
|
104
|
+
|
105
|
+
if !params[:user_download_file_name].nil?
|
106
|
+
request_params["x-cos-meta-file-name"] = params[:user_download_file_name]
|
107
|
+
end
|
103
108
|
request_params["file"] = Faraday::UploadIO.new(build_file, content_type)
|
104
109
|
|
105
110
|
UI.message "Start upload #{build_file} to pgyer..."
|
106
111
|
|
112
|
+
UI.message "Upload endpoint: #{endpoint}"
|
113
|
+
|
114
|
+
UI.message "Upload request_params: #{request_params}"
|
115
|
+
|
116
|
+
|
117
|
+
|
107
118
|
response = pgyer_client.post endpoint, request_params
|
108
119
|
|
109
120
|
if response.status != 204
|
@@ -152,10 +163,21 @@ module Fastlane
|
|
152
163
|
verify_block: proc do |value|
|
153
164
|
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
154
165
|
end,
|
155
|
-
conflicting_options: [:ipa],
|
166
|
+
conflicting_options: [:ipa, :hap],
|
156
167
|
conflict_block: proc do |value|
|
157
168
|
UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
|
158
169
|
end),
|
170
|
+
FastlaneCore::ConfigItem.new(key: :hap,
|
171
|
+
env_name: "PGYER_HAP",
|
172
|
+
description: "Path to your HAP file",
|
173
|
+
optional: true,
|
174
|
+
verify_block: proc do |value|
|
175
|
+
UI.user_error!("Couldn't find hap file at path '#{value}'") unless File.exist?(value)
|
176
|
+
end,
|
177
|
+
conflicting_options: [:ipa, :apk],
|
178
|
+
conflict_block: proc do |value|
|
179
|
+
UI.user_error!("You can't use 'hap' and '#{value.key}' options in one run")
|
180
|
+
end),
|
159
181
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
160
182
|
env_name: "PGYER_IPA",
|
161
183
|
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file",
|
@@ -164,15 +186,34 @@ module Fastlane
|
|
164
186
|
verify_block: proc do |value|
|
165
187
|
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
166
188
|
end,
|
167
|
-
conflicting_options: [:apk],
|
189
|
+
conflicting_options: [:apk, :hap],
|
168
190
|
conflict_block: proc do |value|
|
169
191
|
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
|
170
192
|
end),
|
193
|
+
FastlaneCore::ConfigItem.new(key: :hap,
|
194
|
+
env_name: "PGYER_HAP",
|
195
|
+
description: "Path to your HAP file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file",
|
196
|
+
default_value: Actions.lane_context[:HVIGOR_HAP_OUTPUT_PATH],
|
197
|
+
optional: true,
|
198
|
+
verify_block: proc do |value|
|
199
|
+
UI.user_error!("Couldn't find hap file at path '#{value}'") unless File.exist?(value)
|
200
|
+
end,
|
201
|
+
conflicting_options: [:apk, :ipa],
|
202
|
+
conflict_block: proc do |value|
|
203
|
+
UI.user_error!("You can't use 'hap' and '#{value.key}' options in one run")
|
204
|
+
end),
|
171
205
|
FastlaneCore::ConfigItem.new(key: :password,
|
172
206
|
env_name: "PGYER_PASSWORD",
|
173
207
|
description: "Set password to protect app",
|
174
208
|
optional: true,
|
175
209
|
type: String),
|
210
|
+
|
211
|
+
FastlaneCore::ConfigItem.new(key: :user_download_file_name,
|
212
|
+
env_name: "USER_DOWNLOAD_FILE_NAME",
|
213
|
+
description: "Rename the file name that user downloaded from pgyer",
|
214
|
+
optional: true,
|
215
|
+
type: String),
|
216
|
+
|
176
217
|
FastlaneCore::ConfigItem.new(key: :update_description,
|
177
218
|
env_name: "PGYER_UPDATE_DESCRIPTION",
|
178
219
|
description: "Set update description for app",
|
@@ -231,6 +272,16 @@ module Fastlane
|
|
231
272
|
|
232
273
|
private
|
233
274
|
|
275
|
+
def self.get_type(params)
|
276
|
+
type = params[:ipa].nil? ? "android" : "ios"
|
277
|
+
|
278
|
+
if !params[:hap].nil?
|
279
|
+
type = "hap"
|
280
|
+
end
|
281
|
+
|
282
|
+
type
|
283
|
+
end
|
284
|
+
|
234
285
|
def self.checkPublishStatus(client, api_host, api_key, buildKey)
|
235
286
|
url ="#{api_host}/buildInfo"
|
236
287
|
UI.message "checkPublishStatus url: #{url}"
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-pgyer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rexshi
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -150,7 +149,6 @@ dependencies:
|
|
150
149
|
- - ">="
|
151
150
|
- !ruby/object:Gem::Version
|
152
151
|
version: '0'
|
153
|
-
description:
|
154
152
|
email: rexshi@pgyer.com
|
155
153
|
executables: []
|
156
154
|
extensions: []
|
@@ -166,7 +164,6 @@ homepage: https://github.com/shishirui/fastlane-plugin-pgyer
|
|
166
164
|
licenses:
|
167
165
|
- MIT
|
168
166
|
metadata: {}
|
169
|
-
post_install_message:
|
170
167
|
rdoc_options: []
|
171
168
|
require_paths:
|
172
169
|
- lib
|
@@ -181,8 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
178
|
- !ruby/object:Gem::Version
|
182
179
|
version: '0'
|
183
180
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
185
|
-
signing_key:
|
181
|
+
rubygems_version: 3.7.1
|
186
182
|
specification_version: 4
|
187
183
|
summary: distribute app to pgyer beta testing service
|
188
184
|
test_files: []
|