fastlane-plugin-huawei_appgallery 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e58d2df318d7c967134470a65f3d5fa6753591e4d6c4baf81d0dcbeffb26de8b
4
- data.tar.gz: 4fa8d8662a15f983cd0872cfc39766080ac581aae04624461c2985768879e1a3
3
+ metadata.gz: c882cef46de0575a7fd656514fca1823be354b5ee71f2f9becf65a0279d510a8
4
+ data.tar.gz: 668b1399498078db3d91adf2eb458b9e464841d7b1fbd09941e7c8befef2ab04
5
5
  SHA512:
6
- metadata.gz: 0a6aa9a3288167b37e2c0efd5088a15ecdf3e2802c9c064e7b6b9a17c75c12235f6b002b971ed96fe5fc6718bfd65f6edc82a0ec27bd4bf2e5cf817222b22f0d
7
- data.tar.gz: 325887c3576a3fc3796dabef9f0f30e08c32b725539d396543a4f68961e9e9ce7bafb4bf551d7d147b7138f51d5d95ce7167b8653e6f5c882279224abbd891f4
6
+ metadata.gz: 97c18371e918b19761bc0d28ca38ba169ff8284cdcab3fbc3fa5bcac649dfadd4fa3c417470d01ff59b0af526f88ff07345af456f16dddc4fd2e54d467873814
7
+ data.tar.gz: d76d8a345ba28e12d61c4c9bc15dfe8733c70215113ba6f136a1debdec52495d055eb7333eec6b9e9382492f8a794db2a4328ac5d517d8133e00acf4470de507
@@ -175,7 +175,20 @@ module Fastlane
175
175
 
176
176
  def self.submit_app(client_id, access_token, app_id)
177
177
  UI.message('Submitting app for review ...')
178
+ result_code = launch_submit_request(client_id, access_token, app_id)
179
+ if result_code == 204144660 # https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-returncode_v2
180
+ UI.message('Submission failed, waiting some time and try again.')
181
+ sleep(120)
182
+ if launch_submit_request(client_id, access_token, app_id) != 0
183
+ UI.user_error!('Submission failed again.')
184
+ end
185
+ elsif result_code != 0
186
+ UI.message('Submission failed.')
187
+ end
188
+ end
189
+
178
190
 
191
+ def self.launch_submit_request(client_id, access_token, app_id)
179
192
  # should be in format yyyy-MM-dd'T'HH:mm:ssZZ, must be escaped to be GET param
180
193
  # https://apidock.com/ruby/DateTime/strftime
181
194
  # https://www.shortcutfoo.com/app/dojos/ruby-date-format-strftime/cheatsheet
@@ -199,6 +212,13 @@ module Fastlane
199
212
  result_json = JSON.parse(result.body)
200
213
  json_ret = result_json['ret']
201
214
  UI.message("app-submit ret: #{json_ret}")
215
+ result_code = json_ret['code']
216
+
217
+ if result_code == 0
218
+ UI.message('Submission was successfull!')
219
+ end
220
+
221
+ return result_code
202
222
  end
203
223
  end
204
224
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module HuaweiAppgallery
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-huawei_appgallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Kaiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-31 00:00:00.000000000 Z
11
+ date: 2021-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry