fastlane-plugin-huawei_appgallery_connect 1.1.1 → 1.1.2
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 +10 -1
- data/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb +60 -0
- data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb +30 -0
- data/lib/fastlane/plugin/huawei_appgallery_connect/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f377bfaf9dc4c4fa327c1052c729e6ee5bc34f8322784baea764ef20c0eb60f
|
|
4
|
+
data.tar.gz: 97524455bae097dd8964426154f873a778af0404b6ab91d8f653810190265e5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cedf12f29232315d6081ee3b418ac6175e54bb480da496410b3081b10b20443e1a8b0ecdac2c72b9d452eb7835a9e6de1560150c01a5081fb2e28fef3d5c1af2
|
|
7
|
+
data.tar.gz: 0e64b061ba06cf0a47ac34bd459f5e62ae909134b269a0e292b08a86c671eea67572136a955dec6d34d5c280b07ea4d07fed99e4e22eaa182cd519eaa90cbce0
|
data/README.md
CHANGED
|
@@ -96,6 +96,16 @@ huawei_appgallery_connect_submit_for_review(
|
|
|
96
96
|
)
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
If a version is already under review and must be edited or replaced, withdraw it first:
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
huawei_appgallery_connect_withdraw_review(
|
|
103
|
+
client_id: "<CLIENT_ID>",
|
|
104
|
+
client_secret: "<CLIENT_SECRET>",
|
|
105
|
+
app_id: "<APP_ID>"
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
99
109
|
You can also retrieve app info by making use of the following action
|
|
100
110
|
|
|
101
111
|
```ruby
|
|
@@ -174,4 +184,3 @@ For more information about how the `fastlane` plugin system works, check out the
|
|
|
174
184
|
## About _fastlane_
|
|
175
185
|
|
|
176
186
|
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
|
177
|
-
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
require 'fastlane/action'
|
|
2
|
+
require_relative '../helper/huawei_appgallery_connect_helper'
|
|
3
|
+
|
|
4
|
+
module Fastlane
|
|
5
|
+
module Actions
|
|
6
|
+
class HuaweiAppgalleryConnectWithdrawReviewAction < Action
|
|
7
|
+
def self.run(params)
|
|
8
|
+
token = Helper::HuaweiAppgalleryConnectHelper.get_token(params[:client_id], params[:client_secret])
|
|
9
|
+
|
|
10
|
+
if token.nil?
|
|
11
|
+
UI.user_error!("Cannot retrieve token, please check your client ID and client secret")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
Helper::HuaweiAppgalleryConnectHelper.withdraw_app_review(token, params[:client_id], params[:app_id])
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.description
|
|
18
|
+
"Withdraw an app version currently under AppGallery review"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.authors
|
|
22
|
+
["Shreejan Shrestha"]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.return_value
|
|
26
|
+
"Returns true when AppGallery accepts the review withdrawal"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.details
|
|
30
|
+
"Withdraws an app version from review so it can be updated and submitted again"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.available_options
|
|
34
|
+
[
|
|
35
|
+
FastlaneCore::ConfigItem.new(key: :client_id,
|
|
36
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_CLIENT_ID",
|
|
37
|
+
description: "Huawei AppGallery Connect Client ID",
|
|
38
|
+
optional: false,
|
|
39
|
+
type: String),
|
|
40
|
+
|
|
41
|
+
FastlaneCore::ConfigItem.new(key: :client_secret,
|
|
42
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_CLIENT_SECRET",
|
|
43
|
+
description: "Huawei AppGallery Connect Client Secret",
|
|
44
|
+
optional: false,
|
|
45
|
+
type: String),
|
|
46
|
+
|
|
47
|
+
FastlaneCore::ConfigItem.new(key: :app_id,
|
|
48
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_APP_ID",
|
|
49
|
+
description: "Huawei AppGallery Connect App ID",
|
|
50
|
+
optional: false,
|
|
51
|
+
type: String)
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.is_supported?(platform)
|
|
56
|
+
[:android].include?(platform)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb
CHANGED
|
@@ -337,6 +337,36 @@ module Fastlane
|
|
|
337
337
|
end
|
|
338
338
|
end
|
|
339
339
|
|
|
340
|
+
def self.withdraw_app_review(token, client_id, app_id)
|
|
341
|
+
UI.important("Withdrawing app review")
|
|
342
|
+
|
|
343
|
+
uri = URI.parse("https://connect-api.cloud.huawei.com/api/publish/v1/app-info/withdraw?appId=#{CGI.escape(app_id)}")
|
|
344
|
+
|
|
345
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
346
|
+
http.use_ssl = true
|
|
347
|
+
request = Net::HTTP::Post.new(uri.request_uri)
|
|
348
|
+
request["client_id"] = client_id
|
|
349
|
+
request["Authorization"] = "Bearer #{token}"
|
|
350
|
+
request["Content-Type"] = "application/json"
|
|
351
|
+
|
|
352
|
+
response = http.request(request)
|
|
353
|
+
|
|
354
|
+
unless response.kind_of? Net::HTTPSuccess
|
|
355
|
+
UI.user_error!("Cannot withdraw app review (status code: #{response.code}, body: #{response.body})")
|
|
356
|
+
return false
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
result_json = JSON.parse(response.body)
|
|
360
|
+
|
|
361
|
+
if result_json['ret']['code'] == 0
|
|
362
|
+
UI.success("Successfully withdrew app review")
|
|
363
|
+
true
|
|
364
|
+
else
|
|
365
|
+
UI.user_error!(result_json)
|
|
366
|
+
false
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
340
370
|
def self.prepare_test_config(params)
|
|
341
371
|
# Calculate test start time (1 hour from now if not provided)
|
|
342
372
|
start_time = if params[:test_start_time]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-huawei_appgallery_connect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shreejan Shrestha
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -150,7 +150,7 @@ dependencies:
|
|
|
150
150
|
- - ">="
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
|
-
description:
|
|
153
|
+
description:
|
|
154
154
|
email: shr3jn@gmail.com
|
|
155
155
|
executables: []
|
|
156
156
|
extensions: []
|
|
@@ -165,13 +165,14 @@ files:
|
|
|
165
165
|
- lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_set_gms_dependency.rb
|
|
166
166
|
- lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_submit_for_review.rb
|
|
167
167
|
- lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb
|
|
168
|
+
- lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb
|
|
168
169
|
- lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb
|
|
169
170
|
- lib/fastlane/plugin/huawei_appgallery_connect/version.rb
|
|
170
171
|
homepage: https://github.com/shr3jn/fastlane-plugin-huawei_appgallery_connect
|
|
171
172
|
licenses:
|
|
172
173
|
- MIT
|
|
173
174
|
metadata: {}
|
|
174
|
-
post_install_message:
|
|
175
|
+
post_install_message:
|
|
175
176
|
rdoc_options: []
|
|
176
177
|
require_paths:
|
|
177
178
|
- lib
|
|
@@ -186,8 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
186
187
|
- !ruby/object:Gem::Version
|
|
187
188
|
version: '0'
|
|
188
189
|
requirements: []
|
|
189
|
-
rubygems_version: 3.0.
|
|
190
|
-
signing_key:
|
|
190
|
+
rubygems_version: 3.0.3.1
|
|
191
|
+
signing_key:
|
|
191
192
|
specification_version: 4
|
|
192
193
|
summary: Huawei AppGallery Connect Plugin
|
|
193
194
|
test_files: []
|