fastlane-plugin-firebase_app_distribution 0.3.5 → 0.3.7
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/fad-icon.png +0 -0
- data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb +1 -0
- data/lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb +1 -0
- data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_auth_client.rb +18 -11
- data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb +2 -0
- data/lib/fastlane/plugin/firebase_app_distribution/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43bd3ef5d8039fd654ebd1714e392946de5a99925068a968075b5d55d9b95e40
|
4
|
+
data.tar.gz: 14093f5868a85275b05d1e69dcff7cb1b07efa90af0ab02e7eec3866b5fc4d41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdc2b3f3e407d58d6f5d03517242c0af4c6b3eeecd02ad20f00318bbbad415e01d4e5664d2a1e7bca8574cfd4c2b2753d16fa2713e50b6f1bee874b970c9a323
|
7
|
+
data.tar.gz: 98e71f13d3b74b63f216904ee60b778cb39eb4bc9ff681ab9a857ddfd5bc8718b7c0c69fbd395beecd137abee5fe5dfc4db42e596b8020b10cc0fa2109eef8f1
|
data/fad-icon.png
ADDED
Binary file
|
data/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb
CHANGED
@@ -189,6 +189,7 @@ module Fastlane
|
|
189
189
|
verify_block: proc do |value|
|
190
190
|
UI.user_error!("firebase_app_distribution: '#{value}' is not a valid value for android_artifact_type. Should be 'APK' or 'AAB'") unless ['APK', 'AAB'].include?(value)
|
191
191
|
end),
|
192
|
+
# Generic
|
192
193
|
FastlaneCore::ConfigItem.new(key: :app,
|
193
194
|
env_name: "FIREBASEAPPDISTRO_APP",
|
194
195
|
description: "Your app's Firebase App ID. You can find the App ID in the Firebase console, on the General Settings page",
|
data/lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb
CHANGED
@@ -110,6 +110,7 @@ module Fastlane
|
|
110
110
|
# Throws a user_error if the binary file does not exist
|
111
111
|
def upload_binary(app_name, binary_path, platform)
|
112
112
|
response = connection.post(binary_upload_url(app_name), read_binary(binary_path)) do |request|
|
113
|
+
request.options.timeout = 300 # seconds
|
113
114
|
request.headers[AUTHORIZATION] = "Bearer " + @auth_token
|
114
115
|
request.headers[CONTENT_TYPE] = APPLICATION_OCTET_STREAM
|
115
116
|
request.headers[CLIENT_VERSION] = client_version_header_value
|
data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_auth_client.rb
CHANGED
@@ -48,20 +48,27 @@ module Fastlane
|
|
48
48
|
private
|
49
49
|
|
50
50
|
def refresh_token_from_firebase_tools
|
51
|
-
|
52
|
-
config_path = File.expand_path(".config/configstore/firebase-tools.json", "~")
|
53
|
-
else
|
54
|
-
config_path = File.expand_path("configstore/firebase-tools.json", ENV["XDG_CONFIG_HOME"])
|
55
|
-
end
|
56
|
-
|
51
|
+
config_path = format_config_path
|
57
52
|
if File.exist?(config_path)
|
58
53
|
begin
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
54
|
+
firebase_tools_tokens = JSON.parse(File.read(config_path))['tokens']
|
55
|
+
if firebase_tools_tokens.nil?
|
56
|
+
UI.user_error!(ErrorMessage::EMPTY_TOKENS_FIELD)
|
57
|
+
return
|
58
|
+
end
|
59
|
+
refresh_token = firebase_tools_tokens['refresh_token']
|
60
|
+
rescue JSON::ParserError
|
61
|
+
UI.user_error!(ErrorMessage::PARSE_FIREBASE_TOOLS_JSON_ERROR)
|
64
62
|
end
|
63
|
+
refresh_token unless refresh_token.nil? || refresh_token.empty?
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def format_config_path
|
68
|
+
if ENV["XDG_CONFIG_HOME"].nil? || ENV["XDG_CONFIG_HOME"].empty?
|
69
|
+
File.expand_path(".config/configstore/firebase-tools.json", "~")
|
70
|
+
else
|
71
|
+
File.expand_path("configstore/firebase-tools.json", ENV["XDG_CONFIG_HOME"])
|
65
72
|
end
|
66
73
|
end
|
67
74
|
|
data/lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb
CHANGED
@@ -3,6 +3,7 @@ module ErrorMessage
|
|
3
3
|
MISSING_APP_ID = "Missing app id. Please check that the app parameter is set and try again"
|
4
4
|
SERVICE_CREDENTIALS_NOT_FOUND = "Service credentials file does not exist. Please check the service credentials path and try again"
|
5
5
|
PARSE_SERVICE_CREDENTIALS_ERROR = "Failed to extract service account information from the service credentials file"
|
6
|
+
PARSE_FIREBASE_TOOLS_JSON_ERROR = "Encountered error parsing json file. Ensure the firebase-tools.json file is formatted correctly"
|
6
7
|
UPLOAD_RELEASE_NOTES_ERROR = "App Distribution halted because it had a problem uploading release notes"
|
7
8
|
UPLOAD_TESTERS_ERROR = "App Distribution halted because it had a problem adding testers/groups"
|
8
9
|
GET_RELEASE_TIMEOUT = "App Distribution failed to fetch release information"
|
@@ -20,6 +21,7 @@ module ErrorMessage
|
|
20
21
|
PLAY_IAS_TERMS_NOT_ACCEPTED = "You must accept the Play Internal App Sharing (IAS) terms to upload AABs."
|
21
22
|
INVALID_EMAIL_ADDRESS = "You passed an invalid email address."
|
22
23
|
TESTER_LIMIT_VIOLATION = "Creating testers would exceed tester limit"
|
24
|
+
EMPTY_TOKENS_FIELD = "Unable to find \"tokens\" field in the firebase-tools.json file. Ensure that the file has a tokens field and try again"
|
23
25
|
|
24
26
|
def self.aab_upload_error(aab_state)
|
25
27
|
"Failed to process the AAB: #{aab_state}"
|
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.3.
|
4
|
+
version: 0.3.7
|
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: 2022-
|
13
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry
|
@@ -149,6 +149,7 @@ extra_rdoc_files: []
|
|
149
149
|
files:
|
150
150
|
- LICENSE
|
151
151
|
- README.md
|
152
|
+
- fad-icon.png
|
152
153
|
- lib/fastlane/plugin/firebase_app_distribution.rb
|
153
154
|
- lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb
|
154
155
|
- lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_add_testers_action.rb
|