fastlane-plugin-firebase_app_distribution 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb +1 -1
- data/lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb +5 -17
- 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: 1415793a828ae696b67f1568c6393a9ae68eb6dbf17fc2a379904e3256201c1b
|
4
|
+
data.tar.gz: b1e08e8e78359f62c2c76c868c8e80e90bdf3d463951072ecf77aaa46a232ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3c2f313a6401ac052c48329d9f21228c084983c6f6a3c252e22c494c4216b57ee68882668e1f3f6f0e5f639b3389b0701d97dad3c3542289099450aea2f1952
|
7
|
+
data.tar.gz: 29c7622c069712c0012429c26e3ad7e306499c6a29d7a7d837185a008837831dba795787a16930817dbbdbb3aabb0f38f37c06094208d2e1376cff030c79733d
|
data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb
CHANGED
@@ -123,7 +123,7 @@ module Fastlane
|
|
123
123
|
end),
|
124
124
|
FastlaneCore::ConfigItem.new(key: :googleservice_info_plist_path,
|
125
125
|
env_name: "GOOGLESERVICE_INFO_PLIST_PATH",
|
126
|
-
description: "Path to your GoogleService-Info.plist file, relative to the
|
126
|
+
description: "Path to your GoogleService-Info.plist file, relative to the archived product path",
|
127
127
|
default_value: "GoogleService-Info.plist",
|
128
128
|
optional: true,
|
129
129
|
type: String),
|
data/lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb
CHANGED
@@ -37,7 +37,7 @@ module Fastlane
|
|
37
37
|
# emails - String array of app testers' email addresses
|
38
38
|
# group_ids - String array of Firebase tester group IDs
|
39
39
|
#
|
40
|
-
# Throws a user_error if
|
40
|
+
# Throws a user_error if emails or group_ids are invalid
|
41
41
|
def enable_access(app_id, release_id, emails, group_ids)
|
42
42
|
if (emails.nil? || emails.empty?) && (group_ids.nil? || group_ids.empty?)
|
43
43
|
UI.success("✅ No testers passed in. Skipping this step.")
|
@@ -49,8 +49,6 @@ module Fastlane
|
|
49
49
|
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
50
50
|
request.headers[CONTENT_TYPE] = APPLICATION_JSON
|
51
51
|
end
|
52
|
-
rescue Faraday::ResourceNotFound
|
53
|
-
UI.user_error!("#{ErrorMessage::INVALID_APP_ID}: #{app_id}")
|
54
52
|
rescue Faraday::ClientError
|
55
53
|
UI.user_error!("#{ErrorMessage::INVALID_TESTERS} \nEmails: #{emails} \nGroups: #{group_ids}")
|
56
54
|
end
|
@@ -65,7 +63,7 @@ module Fastlane
|
|
65
63
|
# release_id - App release ID, returned by upload_status endpoint
|
66
64
|
# release_notes - String of notes for this release
|
67
65
|
#
|
68
|
-
# Throws a user_error if
|
66
|
+
# Throws a user_error if the release_notes are invalid
|
69
67
|
def post_notes(app_id, release_id, release_notes)
|
70
68
|
payload = { releaseNotes: { releaseNotes: release_notes } }
|
71
69
|
if release_notes.nil? || release_notes.empty?
|
@@ -77,8 +75,6 @@ module Fastlane
|
|
77
75
|
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
78
76
|
request.headers[CONTENT_TYPE] = APPLICATION_JSON
|
79
77
|
end
|
80
|
-
rescue Faraday::ResourceNotFound
|
81
|
-
UI.user_error!("#{ErrorMessage::INVALID_APP_ID}: #{app_id}")
|
82
78
|
rescue Faraday::ClientError => e
|
83
79
|
error = ErrorResponse.new(e.response)
|
84
80
|
UI.user_error!("#{ErrorMessage::INVALID_RELEASE_NOTES}: #{error.message}")
|
@@ -122,7 +118,7 @@ module Fastlane
|
|
122
118
|
# binary_path - Absolute path to your app's apk/ipa file
|
123
119
|
# platform - 'android' or 'ios'
|
124
120
|
#
|
125
|
-
# Throws a user_error if
|
121
|
+
# Throws a user_error if the binary file does not exist
|
126
122
|
def upload_binary(app_id, binary_path, platform)
|
127
123
|
connection.post(binary_upload_url(app_id), read_binary(binary_path)) do |request|
|
128
124
|
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
@@ -131,8 +127,6 @@ module Fastlane
|
|
131
127
|
request.headers["X-APP-DISTRO-API-CLIENT-TYPE"] = platform
|
132
128
|
request.headers["X-APP-DISTRO-API-CLIENT-VERSION"] = Fastlane::FirebaseAppDistribution::VERSION
|
133
129
|
end
|
134
|
-
rescue Faraday::ResourceNotFound
|
135
|
-
UI.user_error!("#{ErrorMessage::INVALID_APP_ID}: #{app_id}")
|
136
130
|
rescue Errno::ENOENT # Raised when binary_path file does not exist
|
137
131
|
UI.user_error!("#{ErrorMessage.binary_not_found(@binary_type)}: #{binary_path}")
|
138
132
|
end
|
@@ -188,15 +182,9 @@ module Fastlane
|
|
188
182
|
# upload_token - URL encoded upload token
|
189
183
|
#
|
190
184
|
# Returns the release ID on a successful release, otherwise returns nil.
|
191
|
-
#
|
192
|
-
# Throws a user_error if an invalid app_id is passed in
|
193
185
|
def get_upload_status(app_id, upload_token)
|
194
|
-
|
195
|
-
|
196
|
-
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
197
|
-
end
|
198
|
-
rescue Faraday::ResourceNotFound
|
199
|
-
UI.user_error!("#{ErrorMessage::INVALID_APP_ID}: #{app_id}")
|
186
|
+
response = connection.get(upload_status_url(app_id, upload_token)) do |request|
|
187
|
+
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
200
188
|
end
|
201
189
|
return UploadStatusResponse.new(response.body)
|
202
190
|
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.
|
4
|
+
version: 0.2.5
|
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:
|
13
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry
|