fastlane-plugin-pgyer 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb +19 -2
- data/lib/fastlane/plugin/pgyer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7261b2197faf3f763d223977c41ee54a636780f0af53732b5187069935a38065
|
4
|
+
data.tar.gz: a1bd3208a9df53bad956d0a91200e1913a6c8fbee534f65822b22660555295f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f513a7c322858279564f883461de6147ace1ff1b7630bb45fa23f89558e4cd0fff14b5881f07d5f487022a0d395136bc89e0cf28b4cf60a101cc96c5809c9c48
|
7
|
+
data.tar.gz: 7048718bcfb9dd9512cccc7a12ea3e044a53537cc53747c6927341a85e47b19ca850104e6a964c553fdce75a5c7443ea576b618d8f47d3c7ffd3607cbce5eec0
|
data/README.md
CHANGED
@@ -115,8 +115,12 @@ install_end_date: The value is a string of characters, such as 2018-12-31.
|
|
115
115
|
|
116
116
|
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
117
|
|
118
|
+
user_download_file_name: The name of the file downloaded by the user, the string type, such as: test.apk.
|
119
|
+
|
118
120
|
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
121
|
|
122
|
+
|
123
|
+
|
120
124
|
```
|
121
125
|
## Run tests for this plugin
|
122
126
|
|
@@ -73,7 +73,7 @@ module Fastlane
|
|
73
73
|
},
|
74
74
|
}
|
75
75
|
|
76
|
-
api_host = "https://www.
|
76
|
+
api_host = "https://www.pgyer.com/apiv2/app"
|
77
77
|
|
78
78
|
pgyer_client = Faraday.new(nil, conn_options) do |c|
|
79
79
|
c.request :multipart
|
@@ -100,10 +100,20 @@ module Fastlane
|
|
100
100
|
UI.user_error!("Get token is failed")
|
101
101
|
end
|
102
102
|
content_type = type == "android" ? "application/vnd.android.package-archive" : "application/octet-stream"
|
103
|
+
|
104
|
+
if !params[:user_download_file_name].nil?
|
105
|
+
request_params["x-cos-meta-file-name"] = params[:user_download_file_name]
|
106
|
+
end
|
103
107
|
request_params["file"] = Faraday::UploadIO.new(build_file, content_type)
|
104
108
|
|
105
109
|
UI.message "Start upload #{build_file} to pgyer..."
|
106
110
|
|
111
|
+
UI.message "Upload endpoint: #{endpoint}"
|
112
|
+
|
113
|
+
UI.message "Upload request_params: #{request_params}"
|
114
|
+
|
115
|
+
|
116
|
+
|
107
117
|
response = pgyer_client.post endpoint, request_params
|
108
118
|
|
109
119
|
if response.status != 204
|
@@ -173,6 +183,13 @@ module Fastlane
|
|
173
183
|
description: "Set password to protect app",
|
174
184
|
optional: true,
|
175
185
|
type: String),
|
186
|
+
|
187
|
+
FastlaneCore::ConfigItem.new(key: :user_download_file_name,
|
188
|
+
env_name: "USER_DOWNLOAD_FILE_NAME",
|
189
|
+
description: "Rename the file name that user downloaded from pgyer",
|
190
|
+
optional: true,
|
191
|
+
type: String),
|
192
|
+
|
176
193
|
FastlaneCore::ConfigItem.new(key: :update_description,
|
177
194
|
env_name: "PGYER_UPDATE_DESCRIPTION",
|
178
195
|
description: "Set update description for app",
|
@@ -243,7 +260,7 @@ module Fastlane
|
|
243
260
|
if shortUrl.nil? || shortUrl == ""
|
244
261
|
shortUrl = info["data"]["buildKey"]
|
245
262
|
end
|
246
|
-
info["data"]["fastlaneAddedWholeVisitUrl"] = "https://www.
|
263
|
+
info["data"]["fastlaneAddedWholeVisitUrl"] = "https://www.pgyer.com/#{shortUrl}"
|
247
264
|
UI.success "Upload success. Visit this URL to see: #{info["data"]["fastlaneAddedWholeVisitUrl"]}"
|
248
265
|
return info["data"]
|
249
266
|
elsif code == 1246 || code == 1247
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-pgyer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rexshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|