fastlane-plugin-huawei_appgallery_connect 1.0.31 → 1.1.0
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 +67 -23
- data/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_action.rb +70 -40
- data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb +42 -4
- 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: 6965d594579b5ea2b695139d9941f41c503572764bad54a4cf3ca1526af6b8ac
|
4
|
+
data.tar.gz: 94e5dabdcc4b006d11a22df3bc6f4b1d035d9f5615cfb70a5243728bc3fa6962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b940e1b2fd83488c5991790b19ebaaa34fdad5675a94a58629b2b1407dc4aa7ad1193fec968413d73c21c1645cae53b8d132c76c4aa9ec7d69e120bb995ae9db
|
7
|
+
data.tar.gz: 4ba42274b3f05e99ec850ae6d9232d42e434bf3fa130ccb638d33676874b81a08ec29efd7e06aedea1542bdecadf8b5eaee2979f3c20daf9e63a2df5f2a16f3c
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Huawei AppGallery Connect Plugin can be used to upload Android application on th
|
|
18
18
|
|
19
19
|
To get started you will need the client id, client Secret & app ID which can be obtained from your Huawei AppGallery Connect account OR can be obtained with huawei_appgallery_connect_get_app_id action (please see example below).
|
20
20
|
|
21
|
-
```
|
21
|
+
```ruby
|
22
22
|
huawei_appgallery_connect(
|
23
23
|
client_id: "<CLIENT_ID>",
|
24
24
|
client_secret: "<CLIENT_SECRET>",
|
@@ -46,13 +46,20 @@ huawei_appgallery_connect(
|
|
46
46
|
phase_release_start_time: "2019-12-25T07:05:15+0000",
|
47
47
|
phase_release_end_time: "2019-12-28T07:05:15+0000",
|
48
48
|
phase_release_percent: "10.00",
|
49
|
-
phase_release_description: "<DESCRIPTION>"
|
49
|
+
phase_release_description: "<DESCRIPTION>",
|
50
|
+
|
51
|
+
# For open testing configuration
|
52
|
+
use_testing_version: true, # Enable open testing
|
53
|
+
skip_manual_review: true, # Skip manual review for internal testing (default: true)
|
54
|
+
test_start_time: "2024-03-20T10:00:00+0000", # Optional: Test start time (defaults to 1 hour from now)
|
55
|
+
test_end_time: "2024-06-08T10:00:00+0000", # Optional: Test end time (defaults to 80 days from start)
|
56
|
+
feedback_email: "test@example.com" # Email for test feedback
|
50
57
|
)
|
51
58
|
```
|
52
59
|
|
53
|
-
You can
|
60
|
+
You can retrieve app id by making use of the following action
|
54
61
|
|
55
|
-
```
|
62
|
+
```ruby
|
56
63
|
huawei_appgallery_connect_get_app_id(
|
57
64
|
client_id: "<CLIENT_ID>",
|
58
65
|
client_secret: "<CLIENT_SECRET>",
|
@@ -62,7 +69,7 @@ huawei_appgallery_connect_get_app_id(
|
|
62
69
|
|
63
70
|
The following action can be used to submit the app for review if submit_for_review was set to false during the upload of apk
|
64
71
|
|
65
|
-
```
|
72
|
+
```ruby
|
66
73
|
huawei_appgallery_connect_submit_for_review(
|
67
74
|
client_id: "<CLIENT_ID>",
|
68
75
|
client_secret: "<CLIENT_SECRET>",
|
@@ -78,12 +85,20 @@ huawei_appgallery_connect_submit_for_review(
|
|
78
85
|
phase_release_start_time: "2019-12-25T07:05:15+0000",
|
79
86
|
phase_release_end_time: "2019-12-28T07:05:15+0000",
|
80
87
|
phase_release_percent: "10.00",
|
81
|
-
phase_release_description: "<DESCRIPTION>"
|
88
|
+
phase_release_description: "<DESCRIPTION>",
|
89
|
+
|
90
|
+
# For open testing configuration
|
91
|
+
use_testing_version: true, # Enable open testing
|
92
|
+
skip_manual_review: true, # Skip manual review for internal testing (default: true)
|
93
|
+
test_start_time: "2024-03-20T10:00:00+0000", # Optional: Test start time (defaults to 1 hour from now)
|
94
|
+
test_end_time: "2024-06-08T10:00:00+0000", # Optional: Test end time (defaults to 80 days from start)
|
95
|
+
feedback_email: "test@example.com" # Email for test feedback
|
82
96
|
)
|
83
97
|
```
|
84
|
-
You can also retreive app info by making use of the following action
|
85
98
|
|
86
|
-
|
99
|
+
You can also retrieve app info by making use of the following action
|
100
|
+
|
101
|
+
```ruby
|
87
102
|
huawei_appgallery_connect_get_app_info(
|
88
103
|
client_id: "<CLIENT_ID>",
|
89
104
|
client_secret: "<CLIENT_SECRET>",
|
@@ -93,7 +108,7 @@ huawei_appgallery_connect_get_app_info(
|
|
93
108
|
|
94
109
|
To update the app's metadata like release notes, app name, brief info and app description you can make use of the following action
|
95
110
|
|
96
|
-
```
|
111
|
+
```ruby
|
97
112
|
huawei_appgallery_connect_update_app_localization(
|
98
113
|
client_id: "<CLIENT_ID>",
|
99
114
|
client_secret: "<CLIENT_SECRET>",
|
@@ -104,7 +119,7 @@ huawei_appgallery_connect_update_app_localization(
|
|
104
119
|
|
105
120
|
To update the GMS dependency of the app, use the following action
|
106
121
|
|
107
|
-
```
|
122
|
+
```ruby
|
108
123
|
huawei_appgallery_connect_set_gms_dependency(
|
109
124
|
client_id: "<CLIENT_ID>",
|
110
125
|
client_secret: "<CLIENT_SECRET>",
|
@@ -116,18 +131,47 @@ huawei_appgallery_connect_set_gms_dependency(
|
|
116
131
|
Your folder structure for applying multiple languages for the metadata should look like this:
|
117
132
|
|
118
133
|
```
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
134
|
+
fastlane
|
135
|
+
└── metadata
|
136
|
+
└── huawei
|
137
|
+
├── en-US
|
138
|
+
│ ├── app_name
|
139
|
+
│ ├── app_description
|
140
|
+
│ ├── introduction
|
141
|
+
│ └── release_notes
|
142
|
+
└── zh-CN
|
143
|
+
├── app_name
|
144
|
+
├── app_description
|
145
|
+
├── introduction
|
146
|
+
└── release_notes
|
147
|
+
```
|
148
|
+
|
149
|
+
## Run tests for this plugin
|
150
|
+
|
151
|
+
To run both the tests, and code style validation, run
|
152
|
+
|
153
|
+
```
|
154
|
+
rake
|
132
155
|
```
|
133
156
|
|
157
|
+
To automatically fix many of the styling issues, use
|
158
|
+
```
|
159
|
+
rubocop -a
|
160
|
+
```
|
161
|
+
|
162
|
+
## Issues and Feedback
|
163
|
+
|
164
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
165
|
+
|
166
|
+
## Troubleshooting
|
167
|
+
|
168
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
169
|
+
|
170
|
+
## Using _fastlane_ Plugins
|
171
|
+
|
172
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
173
|
+
|
174
|
+
## About _fastlane_
|
175
|
+
|
176
|
+
_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
|
+
|
data/lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_action.rb
CHANGED
@@ -10,7 +10,6 @@ module Fastlane
|
|
10
10
|
if token.nil?
|
11
11
|
UI.message("Cannot retrieve token, please check your client ID and client secret")
|
12
12
|
else
|
13
|
-
|
14
13
|
if params[:privacy_policy_url] != nil
|
15
14
|
Helper::HuaweiAppgalleryConnectHelper.update_appinfo(params[:client_id], token, params[:app_id], params[:privacy_policy_url])
|
16
15
|
end
|
@@ -24,9 +23,7 @@ module Fastlane
|
|
24
23
|
sleep(params[:delay_before_submit_for_review])
|
25
24
|
end
|
26
25
|
self.submit_for_review(token, upload_app, params)
|
27
|
-
|
28
26
|
end
|
29
|
-
# Helper::HuaweiAppgalleryConnectHelper.getAppInfo(token, params[:client_id], params[:app_id])
|
30
27
|
end
|
31
28
|
|
32
29
|
def self.submit_for_review(token, upload_app, params)
|
@@ -95,52 +92,52 @@ module Fastlane
|
|
95
92
|
optional: true,
|
96
93
|
type: Boolean),
|
97
94
|
|
98
|
-
FastlaneCore::ConfigItem.new(key: :changelog_path,
|
99
|
-
env_name: "HUAWEI_APPGALLERY_CONNECT_CHANGELOG_PATH",
|
100
|
-
description: "Path to Changelog file (Default empty)",
|
101
|
-
optional: true,
|
102
|
-
type: String),
|
103
|
-
|
104
95
|
FastlaneCore::ConfigItem.new(key: :privacy_policy_url,
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
96
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PRIVACY_POLICY",
|
97
|
+
description: "Privacy Policy URL",
|
98
|
+
optional: true,
|
99
|
+
type: String),
|
100
|
+
|
101
|
+
FastlaneCore::ConfigItem.new(key: :changelog_path,
|
102
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_CHANGELOG_PATH",
|
103
|
+
description: "Path to Changelog file (Default empty)",
|
104
|
+
optional: true,
|
105
|
+
type: String),
|
109
106
|
|
110
107
|
FastlaneCore::ConfigItem.new(key: :phase_wise_release,
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
108
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PHASE_WISE_RELEASE",
|
109
|
+
description: "Phase wise release",
|
110
|
+
optional: true,
|
111
|
+
conflicting_options: [:release_time],
|
112
|
+
type: Boolean),
|
116
113
|
|
117
114
|
FastlaneCore::ConfigItem.new(key: :phase_release_start_time,
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
115
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PHASE_RELEASE_START_TIME",
|
116
|
+
description: "Phase release start time in UTC format (yyyy-MM-dd'T'HH:mm:ssZZ)",
|
117
|
+
optional: true,
|
118
|
+
type: String),
|
122
119
|
|
123
120
|
FastlaneCore::ConfigItem.new(key: :phase_release_end_time,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
121
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PHASE_RELEASE_END_TIME",
|
122
|
+
description: "Phase release end time in UTC format (yyyy-MM-dd'T'HH:mm:ssZZ)",
|
123
|
+
optional: true,
|
124
|
+
type: String),
|
128
125
|
|
129
126
|
FastlaneCore::ConfigItem.new(key: :phase_release_percent,
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
127
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PHASE_RELEASE_PERCENT",
|
128
|
+
description: "Percentage of phase release (0-100)",
|
129
|
+
optional: true,
|
130
|
+
type: String),
|
134
131
|
|
135
132
|
FastlaneCore::ConfigItem.new(key: :phase_release_description,
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
133
|
+
env_name: "HUAWEI_APPGALLERY_CONNECT_PHASE_RELEASE_DESCRIPTION",
|
134
|
+
description: "Phase release description",
|
135
|
+
optional: true,
|
136
|
+
type: String),
|
140
137
|
|
141
138
|
FastlaneCore::ConfigItem.new(key: :release_time,
|
142
139
|
env_name: "HUAWEI_APPGALLERY_CONNECT_RELEASE_TIME",
|
143
|
-
description: "Release time in UTC format for app release on a specific date
|
140
|
+
description: "Release time in UTC format for app release on a specific date (yyyy-MM-dd'T'HH:mm:ssZZ)",
|
144
141
|
optional: true,
|
145
142
|
conflicting_options: [:phase_wise_release],
|
146
143
|
type: String),
|
@@ -163,11 +160,44 @@ module Fastlane
|
|
163
160
|
optional: true,
|
164
161
|
type: Integer),
|
165
162
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
163
|
+
FastlaneCore::ConfigItem.new(key: :package_ids,
|
164
|
+
env_name: "HUAWEI_APPGALLERY_PACKAGE_IDS",
|
165
|
+
description: "App Package IDs separated by commas",
|
166
|
+
optional: true,
|
167
|
+
type: String),
|
168
|
+
|
169
|
+
# Open Testing Configuration
|
170
|
+
FastlaneCore::ConfigItem.new(key: :use_testing_version,
|
171
|
+
env_name: "HUAWEI_APPGALLERY_USE_TESTING_VERSION",
|
172
|
+
description: "Enable open testing for the app",
|
173
|
+
optional: true,
|
174
|
+
default_value: false,
|
175
|
+
type: Boolean),
|
176
|
+
|
177
|
+
FastlaneCore::ConfigItem.new(key: :skip_manual_review,
|
178
|
+
env_name: "HUAWEI_APPGALLERY_SKIP_MANUAL_REVIEW",
|
179
|
+
description: "Skip manual review for internal testing",
|
180
|
+
optional: true,
|
181
|
+
default_value: true,
|
182
|
+
type: Boolean),
|
183
|
+
|
184
|
+
FastlaneCore::ConfigItem.new(key: :test_start_time,
|
185
|
+
env_name: "HUAWEI_APPGALLERY_TEST_START_TIME",
|
186
|
+
description: "Test start time in UTC format (yyyy-MM-dd'T'HH:mm:ssZZ). If not provided, defaults to 1 hour from now",
|
187
|
+
optional: true,
|
188
|
+
type: String),
|
189
|
+
|
190
|
+
FastlaneCore::ConfigItem.new(key: :test_end_time,
|
191
|
+
env_name: "HUAWEI_APPGALLERY_TEST_END_TIME",
|
192
|
+
description: "Test end time in UTC format (yyyy-MM-dd'T'HH:mm:ssZZ). If not provided, defaults to 80 days from start time",
|
193
|
+
optional: true,
|
194
|
+
type: String),
|
195
|
+
|
196
|
+
FastlaneCore::ConfigItem.new(key: :feedback_email,
|
197
|
+
env_name: "HUAWEI_APPGALLERY_FEEDBACK_EMAIL",
|
198
|
+
description: "Email address for test feedback",
|
199
|
+
optional: true,
|
200
|
+
type: String)
|
171
201
|
]
|
172
202
|
end
|
173
203
|
|
data/lib/fastlane/plugin/huawei_appgallery_connect/helper/huawei_appgallery_connect_helper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'fastlane_core/ui/ui'
|
2
2
|
require 'cgi'
|
3
|
+
require 'time'
|
3
4
|
|
4
5
|
module Fastlane
|
5
6
|
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
@@ -253,14 +254,20 @@ module Fastlane
|
|
253
254
|
|
254
255
|
release_type = ''
|
255
256
|
release_time = ''
|
256
|
-
|
257
|
-
|
257
|
+
test_config = {}
|
258
|
+
|
259
|
+
# Handle open testing configuration
|
260
|
+
if params[:use_testing_version]
|
261
|
+
UI.important("Configuring open testing")
|
262
|
+
test_config = prepare_test_config(params)
|
263
|
+
release_type = '&releaseType=1' # Open testing release type
|
264
|
+
elsif (params[:phase_wise_release] != nil && params[:phase_wise_release]) && (
|
258
265
|
params[:phase_release_start_time] == nil ||
|
259
266
|
params[:phase_release_end_time] == nil ||
|
260
267
|
params[:phase_release_percent] == nil ||
|
261
268
|
params[:phase_release_description] == nil
|
262
269
|
)
|
263
|
-
UI.user_error!("Submit for review failed. Phase wise release requires Start time, End time Release Percent &
|
270
|
+
UI.user_error!("Submit for review failed. Phase wise release requires Start time, End time Release Percent & Description")
|
264
271
|
return
|
265
272
|
elsif params[:phase_wise_release] != nil && params[:phase_wise_release]
|
266
273
|
release_type = '&releaseType=3'
|
@@ -300,8 +307,14 @@ module Fastlane
|
|
300
307
|
phasedReleasePercent: params[:phase_release_percent],
|
301
308
|
phasedReleaseDescription: params[:phase_release_description]
|
302
309
|
}.to_json
|
310
|
+
elsif params[:use_testing_version]
|
311
|
+
test_config[:releaseType] = 1 # Explicitly set release type for open testing
|
312
|
+
request.body = test_config.to_json
|
303
313
|
end
|
304
314
|
|
315
|
+
UI.important("Request URL: #{uri.to_s}")
|
316
|
+
UI.important("Request Body: #{request.body}")
|
317
|
+
|
305
318
|
response = http.request(request)
|
306
319
|
|
307
320
|
if !response.kind_of? Net::HTTPSuccess
|
@@ -312,7 +325,7 @@ module Fastlane
|
|
312
325
|
result_json = JSON.parse(response.body)
|
313
326
|
|
314
327
|
if result_json['ret']['code'] == 0
|
315
|
-
|
328
|
+
UI.success("Successfully submitted app for review")
|
316
329
|
elsif result_json['ret']['code'] == 204144660 && result_json['ret']['msg'].include?("It may take 2-5 minutes")
|
317
330
|
UI.important(result_json)
|
318
331
|
UI.important("Build is currently processing, waiting for 2 minutes before submitting again...")
|
@@ -322,7 +335,32 @@ module Fastlane
|
|
322
335
|
UI.user_error!(result_json)
|
323
336
|
UI.user_error!("Failed to submit app for review.")
|
324
337
|
end
|
338
|
+
end
|
325
339
|
|
340
|
+
def self.prepare_test_config(params)
|
341
|
+
# Calculate test start time (1 hour from now if not provided)
|
342
|
+
start_time = if params[:test_start_time]
|
343
|
+
Time.parse(params[:test_start_time])
|
344
|
+
else
|
345
|
+
Time.now + (60 * 60) # 1 hour from now
|
346
|
+
end
|
347
|
+
|
348
|
+
# Calculate test end time (80 days from start if not provided)
|
349
|
+
end_time = if params[:test_end_time]
|
350
|
+
Time.parse(params[:test_end_time])
|
351
|
+
else
|
352
|
+
start_time + (80 * 24 * 60 * 60) # 80 days from start
|
353
|
+
end
|
354
|
+
|
355
|
+
{
|
356
|
+
testStartTime: start_time.strftime('%Y-%m-%dT%H:%M:%S+0000'),
|
357
|
+
testEndTime: end_time.strftime('%Y-%m-%dT%H:%M:%S+0000'),
|
358
|
+
skipManualReview: params[:skip_manual_review] != false,
|
359
|
+
feedbackEmail: params[:feedback_email],
|
360
|
+
releaseType: 1, # Force open testing release type
|
361
|
+
testPhase: true, # Explicitly set test phase
|
362
|
+
testMode: 1 # Set test mode to open testing
|
363
|
+
}
|
326
364
|
end
|
327
365
|
|
328
366
|
def self.update_app_localization_info(token, params)
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shreejan Shrestha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|