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

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b34d6851b746d0df4a985fed4cbd775767b1278bb236c67cf5753c85e7168950
4
- data.tar.gz: 0f8ef74f5659bb7a0057e6c3e4c2a015c7aef49eca8f541ef09ee9a11fb3c4d6
3
+ metadata.gz: f2cab54f17d753db9cc09fb212c303bb04aac26eb3845d46046e85e9928b1104
4
+ data.tar.gz: de8cdd261d10373f9585d67d733e1e63db44a57905ad8e9d5651f91225d1618d
5
5
  SHA512:
6
- metadata.gz: 11be0d646292c1ee160b1d704c5af1f051dfb1e90f9f6761d5347b03c92ed6ca8bcaf4249cd518aea979efa496f38eae2fc8d923a5c679ba84b979fa8bd3e5d2
7
- data.tar.gz: 1f9093a5593ed7c862cd96391549800f20bcb50e5c257065210ecba3c210df1a43d4fbc8d2c79565ecf83c347baff767d7eff35a556340d962c2a8e7aa04c348
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.pre.2"
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.pre.2
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-07-26 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