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 +4 -4
- data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb +28 -12
- data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_helper.rb +4 -4
- data/lib/fastlane/plugin/firebase_app_distribution/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5ca3144300e192d87eb1e9457152c5484a057dfcb0d492d672da8cbbf983368
|
4
|
+
data.tar.gz: ab60ae5cf17ba96547e2278b34c4858149960247fcc593e3bd3cb1794d9eaef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14da8737b9424a01aca4e6df1fdc3ce5254343b89e01fbdac31c9e9176cec5b5d351a78dc1d03adc0d1c031207fee049c5a517cf63ce440cf45fa7326cab45a2
|
7
|
+
data.tar.gz: eda22a0b5c8cee1b0c990db5f0137c867d7e5a2be8ee7bd30c50811ba80e9b2585e4af5f56bdd82fcaee1adcfa0367286511c6be3fbdf7f550abb69e88941ea6
|
data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb
CHANGED
@@ -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
|
-
|
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",
|
data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_helper.rb
CHANGED
@@ -28,10 +28,10 @@ module Fastlane
|
|
28
28
|
CFPropertyList.native_types(CFPropertyList::List.new(file: path).value)
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
32
|
-
app_path = parse_plist("#{
|
33
|
-
UI.shell_error!("can't extract application path from Info.plist at #{
|
34
|
-
identifier = parse_plist("#{
|
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
|
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.
|
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-
|
13
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry
|