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 +4 -4
- data/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_action.rb +7 -1
- data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb +10 -3
- data/lib/fastlane/plugin/huawei_appgallery_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d57156fc8d0f2a570e0ebe61f2b051e88b074ef38d423ee9f3163a4096f8b2
|
4
|
+
data.tar.gz: 7f4d0f4d95586a6451771de0ba7ed0345096416f1974ac6fdfe3dcec9a172244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6f10f39d639c5990e418bfc63a9cf923386c53fef41b6a8846172acc30951e91c820ff13a2a072f3cfa21fda41c7dcfa101b96681a5cd496aa35d68e9acc7fa
|
7
|
+
data.tar.gz: df0b4f5db1d91ce34d3aa063ff42bf56206e43527d36c7f0bdb0b753692108bfb24fd0ae03447c089c5107d9ba7210a2019e3a2e046ab91902ca07b87402e284
|
data/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_action.rb
CHANGED
@@ -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)",
|
data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb
CHANGED
@@ -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
|
-
|
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:
|
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
|
|
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.
|
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-
|
11
|
+
date: 2020-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|