fastlane-plugin-huawei_appgallery_connect 1.0.12 → 1.0.13

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: 10df8cd86b7d3f5842e464d2fd87ad5101fd095ea3f3f207e66c3977cb22282f
4
- data.tar.gz: 9b40c384a45c192cae8f0edb998740cadda81934d49d90567a4edcff56bd07aa
3
+ metadata.gz: 02d57156fc8d0f2a570e0ebe61f2b051e88b074ef38d423ee9f3163a4096f8b2
4
+ data.tar.gz: 7f4d0f4d95586a6451771de0ba7ed0345096416f1974ac6fdfe3dcec9a172244
5
5
  SHA512:
6
- metadata.gz: e60e293d3a7185a31c574d2cbdea83dd1a99026c996f6ff3497d1714e7160ff634399495f09d0cdfd9bab2108220f10d724ccd20c07530cb0d30155b3d6c445b
7
- data.tar.gz: 8a572b1ba26f0cc5973966971f3580fc25448d47b8545a5ceac27cd1d6b82507b457afd286cefb825ac4a8438d77f411e057665c9d426a514c315c878b662434
6
+ metadata.gz: c6f10f39d639c5990e418bfc63a9cf923386c53fef41b6a8846172acc30951e91c820ff13a2a072f3cfa21fda41c7dcfa101b96681a5cd496aa35d68e9acc7fa
7
+ data.tar.gz: df0b4f5db1d91ce34d3aa063ff42bf56206e43527d36c7f0bdb0b753692108bfb24fd0ae03447c089c5107d9ba7210a2019e3a2e046ab91902ca07b87402e284
@@ -15,7 +15,7 @@ module Fastlane
15
15
  Helper::HuaweiAppgalleryConnectHelper.update_appinfo(params[:client_id], token, params[:app_id], params[:privacy_policy_url])
16
16
  end
17
17
 
18
- upload_app = Helper::HuaweiAppgalleryConnectHelper.upload_app(token, params[:client_id], params[:app_id], params[:apk_path])
18
+ upload_app = Helper::HuaweiAppgalleryConnectHelper.upload_app(token, params[:client_id], params[:app_id], params[:apk_path], params[:is_aab])
19
19
 
20
20
  if upload_app && params[:submit_for_review] != false
21
21
  Helper::HuaweiAppgalleryConnectHelper.submit_app_for_review(token, params)
@@ -67,6 +67,12 @@ module Fastlane
67
67
  optional: false,
68
68
  type: String),
69
69
 
70
+ FastlaneCore::ConfigItem.new(key: :is_aab,
71
+ env_name: "HUAWEI_APPGALLERY_CONNECT_IS_AAB",
72
+ description: "Specify this to be true if you're uploading aab instead of apk",
73
+ optional: true,
74
+ type: Boolean),
75
+
70
76
  FastlaneCore::ConfigItem.new(key: :changelog_path,
71
77
  env_name: "HUAWEI_APPGALLERY_CONNECT_CHANGELOG_PATH",
72
78
  description: "Path to Changelog file (Default empty)",
@@ -76,10 +76,16 @@ module Fastlane
76
76
  end
77
77
 
78
78
 
79
- def self.upload_app(token, client_id, app_id, apk_path)
79
+ def self.upload_app(token, client_id, app_id, apk_path, is_aab)
80
80
  UI.message("Fetching upload URL")
81
81
 
82
- uri = URI.parse("https://connect-api.cloud.huawei.com/api/publish/v2/upload-url?appId=#{app_id}&suffix=apk")
82
+ if(is_aab)
83
+ uri = URI.parse("https://connect-api.cloud.huawei.com/api/publish/v2/upload-url?appId=#{app_id}&suffix=aab")
84
+ upload_filename = "release.aab"
85
+ else
86
+ uri = URI.parse("https://connect-api.cloud.huawei.com/api/publish/v2/upload-url?appId=#{app_id}&suffix=apk")
87
+ upload_filename = "release.apk"
88
+ end
83
89
 
84
90
  http = Net::HTTP.new(uri.host, uri.port)
85
91
  http.use_ssl = true
@@ -130,10 +136,11 @@ module Fastlane
130
136
  request = Net::HTTP::Put.new(uri.request_uri)
131
137
  request["client_id"] = client_id
132
138
  request["Authorization"] = "Bearer #{token}"
139
+ request['Content-Type'] = "application/json"
133
140
 
134
141
  data = {fileType: 5, files: [{
135
142
 
136
- fileName: "release.apk",
143
+ fileName: upload_filename,
137
144
  fileDestUrl: result_json['result']['UploadFileRsp']['fileInfoList'][0]['fileDestUlr'],
138
145
  size: result_json['result']['UploadFileRsp']['fileInfoList'][0]['size'].to_s
139
146
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module HuaweiAppgalleryConnect
3
- VERSION = "1.0.12"
3
+ VERSION = "1.0.13"
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_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shreejan Shrestha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2020-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry