fastlane-plugin-firebase_app_distribution 0.10.1 → 0.11.0.pre.3
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/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb +22 -21
- data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_apis.rb +0 -46
- data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb +1 -1
- data/lib/fastlane/plugin/firebase_app_distribution/version.rb +1 -1
- metadata +57 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8532309ddc2a210a853b2f4e1c92c335c33a3a189ea3ad363235668d78fcb47
|
|
4
|
+
data.tar.gz: 4e172aaf2c2eadd60b9821a84af2bd0a0fdf3d82bda60f3c1005f3e524c91ce0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 665f758d7fe3ca16c8721eeebb1c4afd1e4bb2ca4ac41f87d1895a929296b92f42b47dca894f68aae187ee39547365b45b8f8604a911147366a8e04d802c7c57
|
|
7
|
+
data.tar.gz: 22788ae720a21c6c8e8f7433217b33fb88f8fff121d2f65c58fba4906e0ed667755287669bf1a5a6e6463d45e9a8d0e32353e33cdab2ec45b753245d7333d061
|
data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb
CHANGED
|
@@ -21,6 +21,7 @@ module Fastlane
|
|
|
21
21
|
extend Helper::FirebaseAppDistributionHelper
|
|
22
22
|
|
|
23
23
|
DEFAULT_UPLOAD_TIMEOUT_SECONDS = 300
|
|
24
|
+
DEFAULT_UPLOAD_RETRIES = 3
|
|
24
25
|
UPLOAD_MAX_POLLING_RETRIES = 60
|
|
25
26
|
UPLOAD_POLLING_INTERVAL_SECONDS = 5
|
|
26
27
|
TEST_MAX_POLLING_RETRIES = 40
|
|
@@ -33,6 +34,7 @@ module Fastlane
|
|
|
33
34
|
app_name = app_name_from_app_id(app_id)
|
|
34
35
|
platform = lane_platform || platform_from_app_id(app_id)
|
|
35
36
|
timeout = get_upload_timeout(params)
|
|
37
|
+
retries = get_upload_retries(params)
|
|
36
38
|
|
|
37
39
|
binary_path = get_binary_path(platform, params)
|
|
38
40
|
UI.user_error!("Couldn't determine path for #{platform} binary.") if binary_path.nil?
|
|
@@ -57,7 +59,7 @@ module Fastlane
|
|
|
57
59
|
|
|
58
60
|
binary_type = binary_type_from_path(binary_path)
|
|
59
61
|
UI.message("📡 Uploading the #{binary_type}.")
|
|
60
|
-
operation = upload_binary(client, app_name, binary_path, binary_type, timeout)
|
|
62
|
+
operation = upload_binary(client, app_name, binary_path, binary_type, timeout, retries)
|
|
61
63
|
UI.message("🕵️ Validating upload…")
|
|
62
64
|
release = poll_upload_release_operation(client, operation, binary_type)
|
|
63
65
|
|
|
@@ -185,6 +187,14 @@ module Fastlane
|
|
|
185
187
|
end
|
|
186
188
|
end
|
|
187
189
|
|
|
190
|
+
def self.get_upload_retries(params)
|
|
191
|
+
if params[:upload_retries]
|
|
192
|
+
return params[:upload_retries]
|
|
193
|
+
else
|
|
194
|
+
return DEFAULT_UPLOAD_RETRIES
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
188
198
|
def self.validate_aab_setup!(aab_info)
|
|
189
199
|
if aab_info && aab_info.integration_state != 'INTEGRATED' && aab_info.integration_state != 'AAB_STATE_UNAVAILABLE'
|
|
190
200
|
case aab_info.integration_state
|
|
@@ -252,27 +262,15 @@ module Fastlane
|
|
|
252
262
|
extract_release(operation)
|
|
253
263
|
end
|
|
254
264
|
|
|
255
|
-
def self.upload_binary(client, app_name, binary_path, binary_type, timeout)
|
|
256
|
-
options = Google::Apis::RequestOptions.new
|
|
257
|
-
options.max_elapsed_time = timeout # includes retries (default = no retries)
|
|
265
|
+
def self.upload_binary(client, app_name, binary_path, binary_type, timeout, retries)
|
|
266
|
+
options = Google::Apis::RequestOptions.new(max_elapsed_time: timeout, retries: retries)
|
|
258
267
|
options.header = {
|
|
259
268
|
'Content-Type' => 'application/octet-stream',
|
|
260
|
-
'X-Goog-Upload-File-Name' => CGI.escape(File.basename(binary_path))
|
|
261
|
-
'X-Goog-Upload-Protocol' => 'raw'
|
|
269
|
+
'X-Goog-Upload-File-Name' => CGI.escape(File.basename(binary_path))
|
|
262
270
|
}
|
|
263
271
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
# standard http call instead and convert it to a long running object
|
|
267
|
-
# https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-firebaseappdistribution_v1/lib/google/apis/firebaseappdistribution_v1/service.rb#L79
|
|
268
|
-
# TODO(kbolay): Prefer client.upload_medium
|
|
269
|
-
response = begin
|
|
270
|
-
client.http(
|
|
271
|
-
:post,
|
|
272
|
-
"https://firebaseappdistribution.googleapis.com/upload/v1/#{app_name}/releases:upload",
|
|
273
|
-
body: File.open(binary_path, 'rb'),
|
|
274
|
-
options: options
|
|
275
|
-
)
|
|
272
|
+
begin
|
|
273
|
+
client.upload_medium(app_name, File.open(binary_path, 'rb'), upload_source: binary_path, options: options)
|
|
276
274
|
rescue Google::Apis::Error => err
|
|
277
275
|
case err.status_code.to_i
|
|
278
276
|
when 403
|
|
@@ -281,8 +279,6 @@ module Fastlane
|
|
|
281
279
|
UI.crash!("#{ErrorMessage.upload_binary_error(binary_type)} (#{err}, status_code: #{err.status_code})")
|
|
282
280
|
end
|
|
283
281
|
end
|
|
284
|
-
|
|
285
|
-
Google::Apis::FirebaseappdistributionV1::GoogleLongrunningOperation.from_json(response)
|
|
286
282
|
end
|
|
287
283
|
|
|
288
284
|
def self.extract_release(operation)
|
|
@@ -505,10 +501,15 @@ module Fastlane
|
|
|
505
501
|
|
|
506
502
|
# Release Distribution
|
|
507
503
|
FastlaneCore::ConfigItem.new(key: :upload_timeout,
|
|
508
|
-
description: "Amount of seconds before the upload will
|
|
504
|
+
description: "Amount of seconds before the upload will timeout, if not completed",
|
|
509
505
|
optional: true,
|
|
510
506
|
default_value: DEFAULT_UPLOAD_TIMEOUT_SECONDS,
|
|
511
507
|
type: Integer),
|
|
508
|
+
FastlaneCore::ConfigItem.new(key: :upload_retries,
|
|
509
|
+
description: "Maximum number of times the upload will retry, if not completed",
|
|
510
|
+
optional: true,
|
|
511
|
+
default_value: DEFAULT_UPLOAD_RETRIES,
|
|
512
|
+
type: Integer),
|
|
512
513
|
FastlaneCore::ConfigItem.new(key: :groups,
|
|
513
514
|
env_name: "FIREBASEAPPDISTRO_GROUPS",
|
|
514
515
|
description: "Group aliases used for distribution, separated by commas",
|
|
@@ -1,48 +1,2 @@
|
|
|
1
1
|
require 'google/apis/firebaseappdistribution_v1'
|
|
2
2
|
require 'google/apis/firebaseappdistribution_v1alpha'
|
|
3
|
-
|
|
4
|
-
# This is partially copied from google/apis/firebaseappdistribution_v1alpha v0.9.0 (2024-12-08) based discovery document revision 20241204.
|
|
5
|
-
# We can't depend on that version directly as long as fastlane locks google-cloud-env < 2.0.0 (to support Ruby 2.6).
|
|
6
|
-
# Newer versions of the API clients depend on google-apis-core >= 0.15.0 which depends on googleauth ~> 1.9 which depends on google-cloud-env ~> 2.1.
|
|
7
|
-
# See also https://github.com/fastlane/fastlane/pull/21685#pullrequestreview-2490037163
|
|
8
|
-
module Google
|
|
9
|
-
module Apis
|
|
10
|
-
module FirebaseappdistributionV1alpha
|
|
11
|
-
class GoogleFirebaseAppdistroV1alphaReleaseTest
|
|
12
|
-
include Google::Apis::Core::Hashable
|
|
13
|
-
|
|
14
|
-
attr_accessor :create_time
|
|
15
|
-
attr_accessor :device_executions
|
|
16
|
-
attr_accessor :display_name
|
|
17
|
-
attr_accessor :login_credential
|
|
18
|
-
attr_accessor :name
|
|
19
|
-
attr_accessor :test_case
|
|
20
|
-
attr_accessor :test_state
|
|
21
|
-
|
|
22
|
-
def initialize(**args)
|
|
23
|
-
update!(**args)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def update!(**args)
|
|
27
|
-
@create_time = args[:create_time] if args.key?(:create_time)
|
|
28
|
-
@device_executions = args[:device_executions] if args.key?(:device_executions)
|
|
29
|
-
@display_name = args[:display_name] if args.key?(:display_name)
|
|
30
|
-
@login_credential = args[:login_credential] if args.key?(:login_credential)
|
|
31
|
-
@name = args[:name] if args.key?(:name)
|
|
32
|
-
@test_case = args[:test_case] if args.key?(:test_case)
|
|
33
|
-
@test_state = args[:test_state] if args.key?(:test_state)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
|
37
|
-
property :create_time, as: 'createTime'
|
|
38
|
-
collection :device_executions, as: 'deviceExecutions', class: Google::Apis::FirebaseappdistributionV1alpha::GoogleFirebaseAppdistroV1alphaDeviceExecution, decorator: Google::Apis::FirebaseappdistributionV1alpha::GoogleFirebaseAppdistroV1alphaDeviceExecution::Representation
|
|
39
|
-
property :display_name, as: 'displayName'
|
|
40
|
-
property :login_credential, as: 'loginCredential', class: Google::Apis::FirebaseappdistributionV1alpha::GoogleFirebaseAppdistroV1alphaLoginCredential, decorator: Google::Apis::FirebaseappdistributionV1alpha::GoogleFirebaseAppdistroV1alphaLoginCredential::Representation
|
|
41
|
-
property :name, as: 'name'
|
|
42
|
-
property :test_case, as: 'testCase'
|
|
43
|
-
property :test_state, as: 'testState'
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb
CHANGED
|
@@ -11,7 +11,7 @@ module ErrorMessage
|
|
|
11
11
|
GET_RELEASE_TIMEOUT = "App Distribution failed to fetch release information."
|
|
12
12
|
REFRESH_TOKEN_ERROR = "App Distribution could not generate credentials from the refresh token specified."
|
|
13
13
|
APP_NOT_ONBOARDED_ERROR = "App Distribution not onboarded."
|
|
14
|
-
INVALID_APP_ID = "App Distribution could not find your app. Make sure to onboard your app by pressing the \"Get started\" button on the App Distribution page in the Firebase console: https://console.firebase.google.com/project/_/appdistribution.
|
|
14
|
+
INVALID_APP_ID = "App Distribution could not find your app. Make sure to onboard your app by pressing the \"Get started\" button on the App Distribution page in the Firebase console: https://console.firebase.google.com/project/_/appdistribution."
|
|
15
15
|
INVALID_PROJECT = "App Distribution could not find your Firebase project. Make sure to onboard an app in your project by pressing the \"Get started\" button on the App Distribution page in the Firebase console: https://console.firebase.google.com/project/_/appdistribution."
|
|
16
16
|
INVALID_PATH = "Could not read content from"
|
|
17
17
|
INVALID_TESTERS = "Could not enable access for testers. Check that the tester emails are formatted correctly, the groups exist and you are using group aliases (not group names) for specifying groups."
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-firebase_app_distribution
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0.pre.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Natchev
|
|
@@ -9,36 +9,50 @@ authors:
|
|
|
9
9
|
- Alonso Salas Infante
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: fastlane
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
requirements:
|
|
18
|
+
- - ">="
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: 2.232.0
|
|
21
|
+
type: :runtime
|
|
22
|
+
prerelease: false
|
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
+
requirements:
|
|
25
|
+
- - ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: 2.232.0
|
|
14
28
|
- !ruby/object:Gem::Dependency
|
|
15
29
|
name: google-apis-firebaseappdistribution_v1
|
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
|
17
31
|
requirements:
|
|
18
32
|
- - "~>"
|
|
19
33
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.
|
|
34
|
+
version: 0.9.0
|
|
21
35
|
type: :runtime
|
|
22
36
|
prerelease: false
|
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
38
|
requirements:
|
|
25
39
|
- - "~>"
|
|
26
40
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.
|
|
41
|
+
version: 0.9.0
|
|
28
42
|
- !ruby/object:Gem::Dependency
|
|
29
43
|
name: google-apis-firebaseappdistribution_v1alpha
|
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
|
31
45
|
requirements:
|
|
32
46
|
- - "~>"
|
|
33
47
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.
|
|
48
|
+
version: 0.12.0
|
|
35
49
|
type: :runtime
|
|
36
50
|
prerelease: false
|
|
37
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
52
|
requirements:
|
|
39
53
|
- - "~>"
|
|
40
54
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 0.
|
|
55
|
+
version: 0.12.0
|
|
42
56
|
- !ruby/object:Gem::Dependency
|
|
43
57
|
name: pry
|
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -113,16 +127,16 @@ dependencies:
|
|
|
113
127
|
name: rubocop
|
|
114
128
|
requirement: !ruby/object:Gem::Requirement
|
|
115
129
|
requirements:
|
|
116
|
-
- -
|
|
130
|
+
- - "~>"
|
|
117
131
|
- !ruby/object:Gem::Version
|
|
118
|
-
version:
|
|
132
|
+
version: '1.84'
|
|
119
133
|
type: :development
|
|
120
134
|
prerelease: false
|
|
121
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
136
|
requirements:
|
|
123
|
-
- -
|
|
137
|
+
- - "~>"
|
|
124
138
|
- !ruby/object:Gem::Version
|
|
125
|
-
version:
|
|
139
|
+
version: '1.84'
|
|
126
140
|
- !ruby/object:Gem::Dependency
|
|
127
141
|
name: rubocop-require_tools
|
|
128
142
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -137,6 +151,34 @@ dependencies:
|
|
|
137
151
|
- - ">="
|
|
138
152
|
- !ruby/object:Gem::Version
|
|
139
153
|
version: '0'
|
|
154
|
+
- !ruby/object:Gem::Dependency
|
|
155
|
+
name: rubocop-rake
|
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
|
157
|
+
requirements:
|
|
158
|
+
- - ">="
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: '0'
|
|
161
|
+
type: :development
|
|
162
|
+
prerelease: false
|
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
164
|
+
requirements:
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: '0'
|
|
168
|
+
- !ruby/object:Gem::Dependency
|
|
169
|
+
name: rubocop-rspec
|
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
- - ">="
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '0'
|
|
175
|
+
type: :development
|
|
176
|
+
prerelease: false
|
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
178
|
+
requirements:
|
|
179
|
+
- - ">="
|
|
180
|
+
- !ruby/object:Gem::Version
|
|
181
|
+
version: '0'
|
|
140
182
|
- !ruby/object:Gem::Dependency
|
|
141
183
|
name: simplecov
|
|
142
184
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -152,19 +194,19 @@ dependencies:
|
|
|
152
194
|
- !ruby/object:Gem::Version
|
|
153
195
|
version: '0'
|
|
154
196
|
- !ruby/object:Gem::Dependency
|
|
155
|
-
name:
|
|
197
|
+
name: racc
|
|
156
198
|
requirement: !ruby/object:Gem::Requirement
|
|
157
199
|
requirements:
|
|
158
200
|
- - ">="
|
|
159
201
|
- !ruby/object:Gem::Version
|
|
160
|
-
version:
|
|
202
|
+
version: '0'
|
|
161
203
|
type: :development
|
|
162
204
|
prerelease: false
|
|
163
205
|
version_requirements: !ruby/object:Gem::Requirement
|
|
164
206
|
requirements:
|
|
165
207
|
- - ">="
|
|
166
208
|
- !ruby/object:Gem::Version
|
|
167
|
-
version:
|
|
209
|
+
version: '0'
|
|
168
210
|
email:
|
|
169
211
|
- snatchev@google.com
|
|
170
212
|
- mannyjimenez@google.com
|
|
@@ -200,14 +242,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
200
242
|
requirements:
|
|
201
243
|
- - ">="
|
|
202
244
|
- !ruby/object:Gem::Version
|
|
203
|
-
version: '
|
|
245
|
+
version: '2.7'
|
|
204
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
247
|
requirements:
|
|
206
248
|
- - ">="
|
|
207
249
|
- !ruby/object:Gem::Version
|
|
208
250
|
version: '0'
|
|
209
251
|
requirements: []
|
|
210
|
-
rubygems_version: 3.6.
|
|
252
|
+
rubygems_version: 3.6.9
|
|
211
253
|
specification_version: 4
|
|
212
254
|
summary: Release your beta builds to Firebase App Distribution. https://firebase.google.com/docs/app-distribution
|
|
213
255
|
test_files: []
|