fastlane-plugin-firebase_app_distribution 0.7.0 → 0.7.1.pre.1

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: e53466e9caf8eba25de3ee69f4a6752d53631355338b9b4d8af6466d2657f905
4
- data.tar.gz: 4369f2e799855825d7c6030fc88331e4d5a462c979df16f443e04646538d22f0
3
+ metadata.gz: f2cab54f17d753db9cc09fb212c303bb04aac26eb3845d46046e85e9928b1104
4
+ data.tar.gz: de8cdd261d10373f9585d67d733e1e63db44a57905ad8e9d5651f91225d1618d
5
5
  SHA512:
6
- metadata.gz: 51d11e4c4f0d26b44af5bd3ac171c20333b025d3234197bd9def7930f9d3b1b29731732a347a0f2e7dc808ef76c9d08fe8ac5ce9ba149cae2f430c1d93aa3915
7
- data.tar.gz: 45c6dceff2f75a6371d5065f34f5c184f737962f022cfca598a16ba4f2e19d163ea3200c5f829e14265eddddb6d5d117d20d1dd74d7ae41781f5db1936e29916
6
+ metadata.gz: ccb49a903c1047966e1d35e76d39a594bd1c796aa76b25b34e71eecaa19f4a51672a8dbc1be507f6d6b7e51234fab425a5b53d6aa5e935287081156e164ebd73
7
+ data.tar.gz: 99537c46b4da93a2de0b42a61aa37f1d71b1fa01ec3b63ec2b657781b90720366ae5790a109eba1ce9c1c6962b336d2af6240e8f3ffaf560201467be77f4de25
@@ -28,15 +28,22 @@ module Fastlane
28
28
  app_id = app_id_from_params(params)
29
29
  app_name = app_name_from_app_id(app_id)
30
30
  platform = lane_platform || platform_from_app_id(app_id)
31
+ timeout = get_upload_timeout(params)
31
32
 
32
33
  binary_path = get_binary_path(platform, params)
33
34
  UI.user_error!("Couldn't find binary") if binary_path.nil?
34
35
  UI.user_error!("Couldn't find binary at path #{binary_path}") unless File.exist?(binary_path)
35
36
  binary_type = binary_type_from_path(binary_path)
36
37
 
37
- client = init_client(params[:service_credentials_file], params[:firebase_cli_token], params[:debug])
38
+ # TODO(lkellogg): This sets the send timeout for all POST requests made by the client, but
39
+ # ideally the timeout should only apply to the binary upload
40
+ client = init_client(params[:service_credentials_file],
41
+ params[:firebase_cli_token],
42
+ params[:debug],
43
+ timeout)
38
44
 
39
- # If binary is an AAB, get the AAB info for this app, which includes the integration state and certificate data
45
+ # If binary is an AAB, get the AAB info for this app, which includes the integration state
46
+ # and certificate data
40
47
  if binary_type == :AAB
41
48
  aab_info = get_aab_info(client, app_name)
42
49
  validate_aab_setup!(aab_info)
@@ -44,8 +51,6 @@ module Fastlane
44
51
 
45
52
  binary_type = binary_type_from_path(binary_path)
46
53
  UI.message("⌛ Uploading the #{binary_type}.")
47
-
48
- timeout = get_upload_timeout(params)
49
54
  operation = upload_binary(app_name, binary_path, client, timeout)
50
55
  release = poll_upload_release_operation(client, operation, binary_type)
51
56
 
@@ -242,12 +247,13 @@ module Fastlane
242
247
 
243
248
  def self.upload_binary(app_name, binary_path, client, timeout)
244
249
  options = Google::Apis::RequestOptions.new
245
- options.max_elapsed_time = timeout
250
+ options.max_elapsed_time = timeout # includes retries (default = no retries)
246
251
  options.header = {
247
252
  'Content-Type' => 'application/octet-stream',
248
253
  'X-Goog-Upload-File-Name' => File.basename(binary_path),
249
254
  'X-Goog-Upload-Protocol' => 'raw'
250
255
  }
256
+
251
257
  # For some reason calling the client.upload_medium returns nil when
252
258
  # it should return a long running operation object, so we make a
253
259
  # standard http call instead and convert it to a long running object
@@ -65,7 +65,7 @@ module Fastlane
65
65
  "#{project_name(project_number)}/groups/#{group_alias}"
66
66
  end
67
67
 
68
- def init_client(service_credentials_file, firebase_cli_token, debug = false)
68
+ def init_client(service_credentials_file, firebase_cli_token, debug, timeout = nil)
69
69
  if debug
70
70
  UI.important("Warning: Debug logging enabled. Output may include sensitive information.")
71
71
  Google::Apis.logger.level = Logger::DEBUG
@@ -73,6 +73,10 @@ module Fastlane
73
73
 
74
74
  Google::Apis::ClientOptions.default.application_name = "fastlane"
75
75
  Google::Apis::ClientOptions.default.application_version = Fastlane::FirebaseAppDistribution::VERSION
76
+ unless timeout.nil?
77
+ Google::Apis::ClientOptions.default.send_timeout_sec = timeout
78
+ end
79
+
76
80
  client = Google::Apis::FirebaseappdistributionV1::FirebaseAppDistributionService.new
77
81
  client.authorization = get_authorization(service_credentials_file, firebase_cli_token)
78
82
  client
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FirebaseAppDistribution
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1.pre.1"
4
4
  end
5
5
  end
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.7.0
4
+ version: 0.7.1.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Natchev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-08-01 00:00:00.000000000 Z
13
+ date: 2023-08-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: google-api-client
@@ -206,9 +206,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
- - - ">="
209
+ - - ">"
210
210
  - !ruby/object:Gem::Version
211
- version: '0'
211
+ version: 1.3.1
212
212
  requirements: []
213
213
  rubygems_version: 3.4.10
214
214
  signing_key: