fastlane-plugin-pgyer 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +51 -0
- data/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb +22 -3
- data/lib/fastlane/plugin/pgyer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 855af49c93a79f030c6e6dd06aa08d19a12b76ed220903f0b2c7741bc8ca2b71
|
4
|
+
data.tar.gz: 000465b04372f30898633e359ec947463603ab494c5a24b1566e4ec41fbf3b3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00263521807a7de9939ebdafa95a2be5c65b30fc9b1b75e0a33d748cc6c5c37a19a03546db1b3e119f41b22528545a65b50b7e4a47479b9597bc1d3bac6b103d'
|
7
|
+
data.tar.gz: 38db327f9b0e54d5274efaa6b6e6bcee31d79ca16320da20b6e21debd51e262073e6c1b0f8f71f853491ea98cb1027f2b1a9de0e1f0e268faf301b50626bf870
|
data/README.md
CHANGED
@@ -14,6 +14,32 @@ fastlane add_plugin pgyer
|
|
14
14
|
|
15
15
|
This pluginin allow you distribute app automatically to [pgyer beta testing service](https://www.pgyer.com) in fastlane workflow.
|
16
16
|
|
17
|
+
## How to update pgyer plugin to the latest version
|
18
|
+
|
19
|
+
**Due to the adjustment of the API interface, please ensure that the plugin version is at least `0.2.4`**
|
20
|
+
|
21
|
+
Plan A: update all plguins (Recommended)
|
22
|
+
|
23
|
+
|
24
|
+
```bash
|
25
|
+
fastlane update_plugins
|
26
|
+
```
|
27
|
+
|
28
|
+
Plan B: update pgyer plugin only
|
29
|
+
|
30
|
+
modify `fastlane/Pluginfile`, update the following line:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
gem 'fastlane-plugin-pgyer', ">= 0.2.4" # ensure plugin version >= 0.2.4
|
34
|
+
```
|
35
|
+
|
36
|
+
and run `bundle install` at the root of your fastlane project to update gemfile.lock
|
37
|
+
|
38
|
+
## Plugin avaliable options
|
39
|
+
|
40
|
+
please visit [https://github.com/shishirui/fastlane-plugin-pgyer/blob/master/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb#L135-L205](https://github.com/shishirui/fastlane-plugin-pgyer/blob/master/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb#L135-L205) to know the options.
|
41
|
+
|
42
|
+
|
17
43
|
## Example
|
18
44
|
|
19
45
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
@@ -45,6 +71,29 @@ lane :beta do
|
|
45
71
|
end
|
46
72
|
```
|
47
73
|
|
74
|
+
|
75
|
+
If the upload is successful, you will get information about the app after it is uploaded, which is returned from the API interface app/buildinfo . You can pass it to other plugins, or export it to the terminal for use by other scripts:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
lane :beta do
|
79
|
+
gym
|
80
|
+
answer = pgyer(api_key: "xxxxxx")
|
81
|
+
puts answer
|
82
|
+
# terminal outputs like this if uploaded successfully
|
83
|
+
# {"buildKey"=>"xxxx", "buildType"=>"2", "buildIsFirst"=>"0", "buildIsLastest"=>"1", "buildFileKey"=>"xxx.apk", "buildFileName"=>"", "buildFileSize"=>"111111", "buildName"=>"testApk", "buildVersion"=>"0.11.0", "buildVersionNo"=>"13", "buildBuildVersion"=>"10", "buildIdentifier"=>"com.pgyer.testapk", "buildIcon"=>"xxxx", "buildDescription"=>"", "buildUpdateDescription"=>"", "buildScreenshots"=>"", "buildShortcutUrl"=>"xxxxxxx", "buildCreated"=>"2023-04-04 11:33:24", "buildUpdated"=>"2023-04-04 11:33:24", "buildQRCodeURL"=>"https://www.pgyer.com/app/qrcodeHistory/xxxxxx", "fastlaneAddedWholeVisitUrl"=>"https://www.pgyer.com/xxxxxx"}
|
84
|
+
puts "url = #{answer["fastlaneAddedWholeVisitUrl"]}"
|
85
|
+
|
86
|
+
# terminal outputs like this if uploaded successfully
|
87
|
+
# url = https://www.pgyer.com/xxxxxx
|
88
|
+
|
89
|
+
# More information please visit https://www.pgyer.com/doc/view/api#fastUploadApp to check API "https://www.pgyer.com/apiv2/app/buildInfo"
|
90
|
+
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
48
97
|
And more params
|
49
98
|
|
50
99
|
```
|
@@ -63,6 +112,8 @@ install_end_date: The value is a string of characters, such as 2018-12-31.
|
|
63
112
|
|
64
113
|
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.
|
65
114
|
|
115
|
+
save_uploaded_info_json: (true or false, default to false) Whether to save the information returned by the API interface to a json file.
|
116
|
+
|
66
117
|
```
|
67
118
|
## Run tests for this plugin
|
68
119
|
|
@@ -73,7 +73,7 @@ module Fastlane
|
|
73
73
|
},
|
74
74
|
}
|
75
75
|
|
76
|
-
api_host = "https://www.
|
76
|
+
api_host = "https://www.xcxwo.com/apiv2/app"
|
77
77
|
|
78
78
|
pgyer_client = Faraday.new(nil, conn_options) do |c|
|
79
79
|
c.request :multipart
|
@@ -110,7 +110,14 @@ module Fastlane
|
|
110
110
|
UI.user_error!("PGYER Plugin Upload Error: #{response.body}")
|
111
111
|
end
|
112
112
|
|
113
|
-
self.checkPublishStatus(pgyer_client, api_host, api_key, key)
|
113
|
+
answer = self.checkPublishStatus(pgyer_client, api_host, api_key, key)
|
114
|
+
|
115
|
+
if params[:save_uploaded_info_json]
|
116
|
+
File.open("pgyer-fastlane-uploaded-app-info.json", "w") do |f|
|
117
|
+
f.write(answer.to_json)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
answer
|
114
121
|
end
|
115
122
|
|
116
123
|
def self.description
|
@@ -171,6 +178,14 @@ module Fastlane
|
|
171
178
|
description: "Set update description for app",
|
172
179
|
optional: true,
|
173
180
|
type: String),
|
181
|
+
|
182
|
+
FastlaneCore::ConfigItem.new(key: :save_uploaded_info_json,
|
183
|
+
env_name: "PGYER_SAVE_UPLOADED_INFO_JSON",
|
184
|
+
description: "Save uploaded info json to file named pgyer-fastlane-uploaded-app-info.json",
|
185
|
+
optional: true,
|
186
|
+
default_value: false,
|
187
|
+
type: Boolean),
|
188
|
+
|
174
189
|
FastlaneCore::ConfigItem.new(key: :install_type,
|
175
190
|
env_name: "PGYER_INSTALL_TYPE",
|
176
191
|
description: "Set install type for app (1=public, 2=password, 3=invite). Please set as a string",
|
@@ -217,6 +232,8 @@ module Fastlane
|
|
217
232
|
private
|
218
233
|
|
219
234
|
def self.checkPublishStatus(client, api_host, api_key, buildKey)
|
235
|
+
url ="#{api_host}/buildInfo"
|
236
|
+
UI.message "checkPublishStatus url: #{url}"
|
220
237
|
response = client.post "#{api_host}/buildInfo", { :_api_key => api_key, :buildKey => buildKey }
|
221
238
|
info = response.body
|
222
239
|
code = info["code"]
|
@@ -226,7 +243,9 @@ module Fastlane
|
|
226
243
|
if shortUrl.nil? || shortUrl == ""
|
227
244
|
shortUrl = info["data"]["buildKey"]
|
228
245
|
end
|
229
|
-
|
246
|
+
info["data"]["fastlaneAddedWholeVisitUrl"] = "https://wwww.xcxwo.com/#{shortUrl}"
|
247
|
+
UI.success "Upload success. Visit this URL to see: #{info["data"]["fastlaneAddedWholeVisitUrl"]}"
|
248
|
+
return info["data"]
|
230
249
|
elsif code == 1246 || code == 1247
|
231
250
|
sleep 3
|
232
251
|
self.checkPublishStatus(client, api_host, api_key, buildKey)
|
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.6
|
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: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
184
|
+
rubygems_version: 3.4.6
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: distribute app to pgyer beta testing service
|