fastlane-plugin-firebase_app_distribution 0.2.1 → 0.2.2.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: 5069b6e632432b25f206acbd47973be4326f582b8e555c7783c26638a6da9c21
4
- data.tar.gz: a8f5e1ff46a220466eaa79e2e1072532b8715c79297462ac064e41da330e4c6e
3
+ metadata.gz: 3bb962d7530d1226f6f4811578bebe6086c1e1d82222ed5d935e3314cb933a50
4
+ data.tar.gz: e2cd536750a1b8e328cba78a43329d4bab7988d74fee1f83ececf19963812acd
5
5
  SHA512:
6
- metadata.gz: 93749ffc7b47c65964da87b9db79925d71f1a0fc81bc0f33bd8710c8af34b934d19c7aad04f1e79bed2f90000190485ed07b86b1fb623cccbd1a81839d0ccdff
7
- data.tar.gz: ebba43e6bc7de7d8742bab36a7a8139b176f1cbfdf2130bdddd2131e114448077f51b3458c308ede0a828335a58ad21cdcfa7fc9a5ca1955f479919868236505
6
+ metadata.gz: b439ab0e98082e51dc96f0f29009aa7ffe83aca6c347f3967ee85e68077161cec8621aeac6861470266226132eec2fa1ae2cd3676be081cf97cc909b948e614d
7
+ data.tar.gz: 9b5777d5e274a92963b57253a81a9866a461f2024f4abf9226b247a65f6e0b4a2f03fc7c439133935115921aadec767048a0a8e68cb03d6a652db36152b7ab60
@@ -20,10 +20,6 @@ module Fastlane
20
20
 
21
21
  def self.run(params)
22
22
  params.values # to validate all inputs before looking for the ipa/apk
23
- auth_token = fetch_auth_token(params[:service_credentials_file], params[:firebase_cli_token])
24
- binary_path = params[:ipa_path] || params[:apk_path]
25
- platform = lane_platform || platform_from_path(binary_path)
26
- fad_api_client = Client::FirebaseAppDistributionApiClient.new(auth_token, platform)
27
23
 
28
24
  if params[:app] # Set app_id if it is specified as a parameter
29
25
  app_id = params[:app]
@@ -33,10 +29,16 @@ module Fastlane
33
29
  app_id = get_ios_app_id_from_archive(archive_path)
34
30
  end
35
31
  end
36
-
37
32
  if app_id.nil?
38
33
  UI.crash!(ErrorMessage::MISSING_APP_ID)
39
34
  end
35
+
36
+ platform = lane_platform || platform_from_app_id(app_id)
37
+ binary_path = binary_path_from_platform(platform, params[:ipa_path], params[:apk_path])
38
+
39
+ auth_token = fetch_auth_token(params[:service_credentials_file], params[:firebase_cli_token])
40
+ fad_api_client = Client::FirebaseAppDistributionApiClient.new(auth_token, platform)
41
+
40
42
  release_id = fad_api_client.upload(app_id, binary_path, platform.to_s)
41
43
  if release_id.nil?
42
44
  return
@@ -70,16 +72,25 @@ module Fastlane
70
72
  Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
71
73
  end
72
74
 
73
- def self.platform_from_path(binary_path)
74
- return nil unless binary_path
75
- case binary_path.split('.').last
76
- when 'ipa'
75
+ def self.platform_from_app_id(app_id)
76
+ if app_id.include?(':ios:')
77
77
  :ios
78
- when 'apk'
78
+ elsif app_id.include?(':android:')
79
79
  :android
80
80
  end
81
81
  end
82
82
 
83
+ def self.binary_path_from_platform(platform, ipa_path, apk_path)
84
+ case platform
85
+ when :ios
86
+ ipa_path
87
+ when :android
88
+ apk_path
89
+ else
90
+ ipa_path || apk_path
91
+ end
92
+ end
93
+
83
94
  def self.available_options
84
95
  if lane_platform == :ios || lane_platform.nil?
85
96
  ipa_path_default = Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FirebaseAppDistribution
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2.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.2.1
4
+ version: 0.2.2.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: 2020-09-16 00:00:00.000000000 Z
13
+ date: 2020-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pry
@@ -173,9 +173,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - ">="
176
+ - - ">"
177
177
  - !ruby/object:Gem::Version
178
- version: '0'
178
+ version: 1.3.1
179
179
  requirements: []
180
180
  rubygems_version: 3.1.2
181
181
  signing_key: