fastlane-plugin-huawei_appgallery 0.2.1 → 0.2.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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c882cef46de0575a7fd656514fca1823be354b5ee71f2f9becf65a0279d510a8
         | 
| 4 | 
            +
              data.tar.gz: 668b1399498078db3d91adf2eb458b9e464841d7b1fbd09941e7c8befef2ab04
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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
         | 
    
        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. | 
| 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:  | 
| 11 | 
            +
            date: 2021-01-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pry
         |