fastlane-plugin-pgyer 0.2.4 → 0.2.5
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 +19 -2
- 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: e0d2b5d771b739f2ef086a57c555e059dfa17617e8e90cda22a088af4a5905f0
|
4
|
+
data.tar.gz: 6cce53577ddd11554435a421efa8dac868b381c38ee951a0a8c8ac3076570317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3333dd01a307b727ede42e013985b4c71974dc154771c3450ba926af31221820943a94f7cfada48b25dbfa27ba3a908feb43df7620d4f309dc8b33037391343b
|
7
|
+
data.tar.gz: b7fa1bb797bcf671edb5204e40614b8a3411d43f3082744f05f7e666d8d71bd6640bec43352a7e6a3c24a210c56e6382931110c226e26d675475391e3c01a138
|
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
|
|
@@ -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",
|
@@ -226,7 +241,9 @@ module Fastlane
|
|
226
241
|
if shortUrl.nil? || shortUrl == ""
|
227
242
|
shortUrl = info["data"]["buildKey"]
|
228
243
|
end
|
229
|
-
|
244
|
+
info["data"]["fastlaneAddedWholeVisitUrl"] = "https://www.pgyer.com/#{shortUrl}"
|
245
|
+
UI.success "Upload success. Visit this URL to see: #{info["data"]["fastlaneAddedWholeVisitUrl"]}"
|
246
|
+
return info["data"]
|
230
247
|
elsif code == 1246 || code == 1247
|
231
248
|
sleep 3
|
232
249
|
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.5
|
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-04-04 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
|