fastlane-plugin-firebase_app_distribution 0.2.2.pre.1 → 0.2.2.pre.2

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: 3bb962d7530d1226f6f4811578bebe6086c1e1d82222ed5d935e3314cb933a50
4
- data.tar.gz: e2cd536750a1b8e328cba78a43329d4bab7988d74fee1f83ececf19963812acd
3
+ metadata.gz: c5ca3144300e192d87eb1e9457152c5484a057dfcb0d492d672da8cbbf983368
4
+ data.tar.gz: ab60ae5cf17ba96547e2278b34c4858149960247fcc593e3bd3cb1794d9eaef9
5
5
  SHA512:
6
- metadata.gz: b439ab0e98082e51dc96f0f29009aa7ffe83aca6c347f3967ee85e68077161cec8621aeac6861470266226132eec2fa1ae2cd3676be081cf97cc909b948e614d
7
- data.tar.gz: 9b5777d5e274a92963b57253a81a9866a461f2024f4abf9226b247a65f6e0b4a2f03fc7c439133935115921aadec767048a0a8e68cb03d6a652db36152b7ab60
6
+ metadata.gz: 14da8737b9424a01aca4e6df1fdc3ce5254343b89e01fbdac31c9e9176cec5b5d351a78dc1d03adc0d1c031207fee049c5a517cf63ce440cf45fa7326cab45a2
7
+ data.tar.gz: eda22a0b5c8cee1b0c990db5f0137c867d7e5a2be8ee7bd30c50811ba80e9b2585e4af5f56bdd82fcaee1adcfa0367286511c6be3fbdf7f550abb69e88941ea6
@@ -21,18 +21,7 @@ module Fastlane
21
21
  def self.run(params)
22
22
  params.values # to validate all inputs before looking for the ipa/apk
23
23
 
24
- if params[:app] # Set app_id if it is specified as a parameter
25
- app_id = params[:app]
26
- elsif platform == :ios
27
- archive_path = Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
28
- if archive_path
29
- app_id = get_ios_app_id_from_archive(archive_path)
30
- end
31
- end
32
- if app_id.nil?
33
- UI.crash!(ErrorMessage::MISSING_APP_ID)
34
- end
35
-
24
+ app_id = app_id_from_params(params)
36
25
  platform = lane_platform || platform_from_app_id(app_id)
37
26
  binary_path = binary_path_from_platform(platform, params[:ipa_path], params[:apk_path])
38
27
 
@@ -68,6 +57,27 @@ module Fastlane
68
57
  "Release your beta builds with Firebase App Distribution"
69
58
  end
70
59
 
60
+ def self.app_id_from_params(params)
61
+ if params[:app]
62
+ app_id = params[:app]
63
+ elsif xcode_archive_path
64
+ plist_path = params[:googleservice_info_plist_path]
65
+ app_id = get_ios_app_id_from_archive_plist(xcode_archive_path, plist_path)
66
+ end
67
+ if app_id.nil?
68
+ UI.crash!(ErrorMessage::MISSING_APP_ID)
69
+ end
70
+ app_id
71
+ end
72
+
73
+ def self.xcode_archive_path
74
+ # prevents issues on cross-platform build environments where an XCode build happens within
75
+ # the same lane
76
+ return nil if lane_platform == :android
77
+
78
+ Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
79
+ end
80
+
71
81
  def self.lane_platform
72
82
  Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
73
83
  end
@@ -111,6 +121,12 @@ module Fastlane
111
121
  verify_block: proc do |value|
112
122
  UI.user_error!("firebase_app_distribution: Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
113
123
  end),
124
+ FastlaneCore::ConfigItem.new(key: :googleservice_info_plist_path,
125
+ env_name: "GOOGLESERVICE_INFO_PLIST_PATH",
126
+ description: "Path to your GoogleService-Info.plist file, relative to the root of your Xcode project",
127
+ default_value: "GoogleService-Info.plist",
128
+ optional: true,
129
+ type: String),
114
130
  # Android Specific
115
131
  FastlaneCore::ConfigItem.new(key: :apk_path,
116
132
  env_name: "FIREBASEAPPDISTRO_APK_PATH",
@@ -28,10 +28,10 @@ module Fastlane
28
28
  CFPropertyList.native_types(CFPropertyList::List.new(file: path).value)
29
29
  end
30
30
 
31
- def get_ios_app_id_from_archive(path)
32
- app_path = parse_plist("#{path}/Info.plist")["ApplicationProperties"]["ApplicationPath"]
33
- UI.shell_error!("can't extract application path from Info.plist at #{path}") if app_path.empty?
34
- identifier = parse_plist("#{path}/Products/#{app_path}/GoogleService-Info.plist")["GOOGLE_APP_ID"]
31
+ def get_ios_app_id_from_archive_plist(archive_path, plist_path)
32
+ app_path = parse_plist("#{archive_path}/Info.plist")["ApplicationProperties"]["ApplicationPath"]
33
+ UI.shell_error!("can't extract application path from Info.plist at #{archive_path}") if app_path.empty?
34
+ identifier = parse_plist("#{archive_path}/Products/#{app_path}/#{plist_path}")["GOOGLE_APP_ID"]
35
35
  UI.shell_error!("can't extract GOOGLE_APP_ID") if identifier.empty?
36
36
  return identifier
37
37
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FirebaseAppDistribution
3
- VERSION = "0.2.2.pre.1"
3
+ VERSION = "0.2.2.pre.2"
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.2.pre.1
4
+ version: 0.2.2.pre.2
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-17 00:00:00.000000000 Z
13
+ date: 2020-09-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pry