fastlane 2.65.0.beta.20171120010003 → 2.65.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deliver/lib/.DS_Store +0 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +47 -32
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +28 -11
- data/snapshot/lib/.DS_Store +0 -0
- metadata +19 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6b2a78c9b6e3e48a30f9433cfda1c683e6a3ce6
|
4
|
+
data.tar.gz: d6efe4c63a4b99dbc604001a97be4b5b1c5991c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71be3e1dc14441c66ca144644c91ef2b672745e7ff273e47a605ff24c3093ec7785c4c83c2b25b85fe782e2cabdd5e9d5140b5afe2fe0dc6324172f61af492c
|
7
|
+
data.tar.gz: 89a89b2265e85b4e2c3edc6826628d22e0df9aa79561a71576e7a848ae4601155495615556225cb5059a848c785f6aa39119ce0719008028bb2cd84fedd715c9
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Fastlane
|
2
|
-
VERSION = '2.65.0
|
2
|
+
VERSION = '2.65.0'.freeze
|
3
3
|
DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
|
4
4
|
MINIMUM_XCODE_RELEASE = "7.0".freeze
|
5
5
|
RUBOCOP_REQUIREMENT = '0.49.1'.freeze
|
@@ -14,6 +14,9 @@ module FastlaneCore
|
|
14
14
|
# @return [String] The name of the configuration file (not the path). Optional!
|
15
15
|
attr_accessor :config_file_name
|
16
16
|
|
17
|
+
# @return [Hash] Options that were set from a config file using load_configuration_file. Optional!
|
18
|
+
attr_accessor :config_file_options
|
19
|
+
|
17
20
|
def self.create(available_options, values)
|
18
21
|
UI.user_error!("values parameter must be a hash") unless values.kind_of?(Hash)
|
19
22
|
v = values.dup
|
@@ -43,6 +46,7 @@ module FastlaneCore
|
|
43
46
|
def initialize(available_options, values)
|
44
47
|
self.available_options = available_options || []
|
45
48
|
self.values = values || {}
|
49
|
+
self.config_file_options = {}
|
46
50
|
|
47
51
|
# used for pushing and popping values to provide nesting configuration contexts
|
48
52
|
@values_stack = []
|
@@ -75,14 +79,10 @@ module FastlaneCore
|
|
75
79
|
# Make sure the given value keys exist
|
76
80
|
@values.each do |key, value|
|
77
81
|
next if key == :trace # special treatment
|
78
|
-
option =
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
option.verify!(@values[key]) # Call the verify block for it too
|
83
|
-
else
|
84
|
-
UI.user_error!("Could not find option '#{key}' in the list of available options: #{@available_options.collect(&:key).join(', ')}")
|
85
|
-
end
|
82
|
+
option = self.verify_options_key!(key)
|
83
|
+
@values[key] = option.auto_convert_value(value)
|
84
|
+
UI.deprecated("Using deprecated option: '--#{key}' (#{option.deprecated})") if option.deprecated
|
85
|
+
option.verify!(@values[key]) # Call the verify block for it too
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -171,8 +171,28 @@ module FastlaneCore
|
|
171
171
|
return if paths.count == 0
|
172
172
|
|
173
173
|
path = paths.first
|
174
|
-
|
174
|
+
begin
|
175
|
+
configuration_file = ConfigurationFile.new(self, path, block_for_missing, skip_printing_values)
|
176
|
+
options = configuration_file.options
|
177
|
+
rescue FastlaneCore::ConfigurationFile::ExceptionWhileParsingError => e
|
178
|
+
options = e.recovered_options
|
179
|
+
wrapped_exception = e.wrapped_exception
|
180
|
+
end
|
181
|
+
|
182
|
+
# Make sure all the values set in the config file pass verification
|
183
|
+
options.each do |key, val|
|
184
|
+
option = self.verify_options_key!(key)
|
185
|
+
option.verify!(val)
|
186
|
+
end
|
187
|
+
|
188
|
+
# Merge the new options into the old ones, keeping all previously set keys
|
189
|
+
self.config_file_options = options.merge(self.config_file_options)
|
190
|
+
|
175
191
|
verify_conflicts # important, since user can set conflicting options in configuration file
|
192
|
+
|
193
|
+
# Now that everything is verified, re-raise an exception that was raised in the config file
|
194
|
+
raise wrapped_exception unless wrapped_exception.nil?
|
195
|
+
|
176
196
|
configuration_file
|
177
197
|
end
|
178
198
|
|
@@ -185,33 +205,22 @@ module FastlaneCore
|
|
185
205
|
def fetch(key, ask: true)
|
186
206
|
UI.user_error!("Key '#{key}' must be a symbol. Example :app_id.") unless key.kind_of?(Symbol)
|
187
207
|
|
188
|
-
option =
|
189
|
-
UI.user_error!("Could not find option for key :#{key}. Available keys: #{@available_options.collect(&:key).join(', ')}") unless option
|
208
|
+
option = verify_options_key!(key)
|
190
209
|
|
191
|
-
|
210
|
+
# Same order as https://docs.fastlane.tools/advanced/#priorities-of-parameters-and-options
|
211
|
+
value = if @values.key?(key) and !@values[key].nil?
|
212
|
+
@values[key]
|
213
|
+
elsif option.env_name and !ENV[option.env_name].nil?
|
214
|
+
ENV[option.env_name].dup
|
215
|
+
elsif self.config_file_options.key?(key)
|
216
|
+
self.config_file_options[key]
|
217
|
+
else
|
218
|
+
option.default_value
|
219
|
+
end
|
192
220
|
|
193
221
|
value = option.auto_convert_value(value)
|
194
|
-
|
195
|
-
# `if value == nil` instead of ||= because false is also a valid value
|
196
|
-
if value.nil? and option.env_name and ENV[option.env_name]
|
197
|
-
|
198
|
-
# We want to inform the user that we took the value
|
199
|
-
# from an environment variable
|
200
|
-
# however we don't print the actual value, as it may contain sensitive information
|
201
|
-
# The user can easily find the actual value by print out the environment
|
202
|
-
UI.verbose("Taking value for '#{key}' from environment variable '#{option.env_name}'")
|
203
|
-
|
204
|
-
value = option.auto_convert_value(ENV[option.env_name].dup)
|
205
|
-
option.verify!(value) if value
|
206
|
-
end
|
207
|
-
|
208
|
-
value = option.default_value if value.nil?
|
209
222
|
value = nil if value.nil? and !option.string? # by default boolean flags are false
|
210
|
-
|
211
|
-
return value unless value.nil? # we already have a value
|
212
|
-
return value if option.optional # as this value is not required, just return what we have
|
213
|
-
|
214
|
-
return value unless ask
|
223
|
+
return value unless value.nil? and !option.optional and ask
|
215
224
|
|
216
225
|
# fallback to asking
|
217
226
|
if Helper.is_test? or !UI.interactive?
|
@@ -298,5 +307,11 @@ module FastlaneCore
|
|
298
307
|
# Aliases `[key]` to `fetch(key)` because Ruby can do it.
|
299
308
|
alias [] fetch
|
300
309
|
alias []= set
|
310
|
+
|
311
|
+
def verify_options_key!(key)
|
312
|
+
option = option_for_key(key)
|
313
|
+
UI.user_error!("Could not find option '#{key}' in the list of available options: #{@available_options.collect(&:key).join(', ')}") unless option
|
314
|
+
option
|
315
|
+
end
|
301
316
|
end
|
302
317
|
end
|
@@ -1,17 +1,31 @@
|
|
1
1
|
module FastlaneCore
|
2
2
|
# Responsible for loading configuration files
|
3
3
|
class ConfigurationFile
|
4
|
-
|
5
|
-
|
4
|
+
class ExceptionWhileParsingError < RuntimeError
|
5
|
+
attr_reader :wrapped_exception
|
6
|
+
attr_reader :recovered_options
|
7
|
+
|
8
|
+
def initialize(wrapped_ex, options)
|
9
|
+
@wrapped_exception = wrapped_ex
|
10
|
+
@recovered_options = options
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# Available keys from the config file
|
15
|
+
attr_accessor :available_keys
|
16
|
+
|
17
|
+
# After loading, contains all the found options
|
18
|
+
attr_accessor :options
|
6
19
|
|
7
20
|
# Path to the config file represented by the current object
|
8
21
|
attr_accessor :configfile_path
|
9
22
|
|
10
|
-
# @param config [FastlaneCore::Configuration] is
|
23
|
+
# @param config [FastlaneCore::Configuration] is used to gather required information about the configuration
|
11
24
|
# @param path [String] The path to the configuration file to use
|
12
25
|
def initialize(config, path, block_for_missing, skip_printing_values = false)
|
13
|
-
self.
|
26
|
+
self.available_keys = config.all_keys
|
14
27
|
self.configfile_path = path
|
28
|
+
self.options = {}
|
15
29
|
|
16
30
|
@block_for_missing = block_for_missing
|
17
31
|
content = File.read(path)
|
@@ -33,6 +47,8 @@ module FastlaneCore
|
|
33
47
|
rescue SyntaxError => ex
|
34
48
|
line = ex.to_s.match(/\(eval\):(\d+)/)[1]
|
35
49
|
UI.user_error!("Syntax error in your configuration file '#{path}' on line #{line}: #{ex}")
|
50
|
+
rescue => ex
|
51
|
+
raise ExceptionWhileParsingError.new(ex, self.options), "Error while parsing config file at #{path}"
|
36
52
|
end
|
37
53
|
end
|
38
54
|
|
@@ -63,9 +79,9 @@ module FastlaneCore
|
|
63
79
|
|
64
80
|
def method_missing(method_sym, *arguments, &block)
|
65
81
|
# First, check if the key is actually available
|
66
|
-
if self.
|
67
|
-
|
68
|
-
|
82
|
+
return if self.options.key?(method_sym)
|
83
|
+
|
84
|
+
if self.available_keys.include?(method_sym)
|
69
85
|
|
70
86
|
value = arguments.first
|
71
87
|
value = yield if value.nil? && block_given?
|
@@ -101,7 +117,7 @@ module FastlaneCore
|
|
101
117
|
# Nothing specific to do here, if we can't dupe, we just
|
102
118
|
# deal with it (boolean values can't be from env variables anyway)
|
103
119
|
end
|
104
|
-
self.
|
120
|
+
self.options[method_sym] = value
|
105
121
|
else
|
106
122
|
# We can't set this value, maybe the tool using this configuration system has its own
|
107
123
|
# way of handling this block, as this might be a special block (e.g. ipa block) that's only
|
@@ -109,7 +125,7 @@ module FastlaneCore
|
|
109
125
|
if @block_for_missing
|
110
126
|
@block_for_missing.call(method_sym, arguments, block)
|
111
127
|
else
|
112
|
-
self.
|
128
|
+
self.options[method_sym] = '' # important, since this will raise a good exception for free
|
113
129
|
end
|
114
130
|
end
|
115
131
|
end
|
@@ -149,11 +165,12 @@ module FastlaneCore
|
|
149
165
|
# (once) again. Those values are then merged into the surrounding
|
150
166
|
# configuration as the block completes
|
151
167
|
def with_a_clean_config_merged_when_complete
|
152
|
-
self.
|
168
|
+
previous_config = self.options.dup
|
169
|
+
self.options = {}
|
153
170
|
begin
|
154
171
|
yield
|
155
172
|
ensure
|
156
|
-
self.
|
173
|
+
self.options = previous_config.merge(self.options)
|
157
174
|
end
|
158
175
|
end
|
159
176
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.65.0
|
4
|
+
version: 2.65.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -808,6 +808,7 @@ files:
|
|
808
808
|
- credentials_manager/lib/credentials_manager/appfile_config.rb
|
809
809
|
- credentials_manager/lib/credentials_manager/cli.rb
|
810
810
|
- deliver/README.md
|
811
|
+
- deliver/lib/.DS_Store
|
811
812
|
- deliver/lib/assets/DeliverfileDefault
|
812
813
|
- deliver/lib/assets/ScreenshotsHelp
|
813
814
|
- deliver/lib/assets/summary.html.erb
|
@@ -1362,6 +1363,7 @@ files:
|
|
1362
1363
|
- sigh/lib/sigh/resign.rb
|
1363
1364
|
- sigh/lib/sigh/runner.rb
|
1364
1365
|
- snapshot/README.md
|
1366
|
+
- snapshot/lib/.DS_Store
|
1365
1367
|
- snapshot/lib/assets/SnapfileTemplate
|
1366
1368
|
- snapshot/lib/assets/SnapshotHelper.swift
|
1367
1369
|
- snapshot/lib/assets/SnapshotHelperXcode8.swift
|
@@ -1504,24 +1506,24 @@ metadata:
|
|
1504
1506
|
post_install_message:
|
1505
1507
|
rdoc_options: []
|
1506
1508
|
require_paths:
|
1507
|
-
-
|
1508
|
-
-
|
1509
|
+
- cert/lib
|
1510
|
+
- credentials_manager/lib
|
1511
|
+
- deliver/lib
|
1512
|
+
- fastlane/lib
|
1513
|
+
- fastlane_core/lib
|
1514
|
+
- frameit/lib
|
1515
|
+
- gym/lib
|
1509
1516
|
- match/lib
|
1517
|
+
- pem/lib
|
1518
|
+
- pilot/lib
|
1510
1519
|
- precheck/lib
|
1511
|
-
- sigh/lib
|
1512
1520
|
- produce/lib
|
1513
1521
|
- scan/lib
|
1514
|
-
-
|
1522
|
+
- screengrab/lib
|
1523
|
+
- sigh/lib
|
1515
1524
|
- snapshot/lib
|
1516
|
-
- frameit/lib
|
1517
|
-
- fastlane/lib
|
1518
|
-
- cert/lib
|
1519
|
-
- pilot/lib
|
1520
1525
|
- spaceship/lib
|
1521
|
-
-
|
1522
|
-
- deliver/lib
|
1523
|
-
- fastlane_core/lib
|
1524
|
-
- pem/lib
|
1526
|
+
- supply/lib
|
1525
1527
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1526
1528
|
requirements:
|
1527
1529
|
- - ">="
|
@@ -1529,14 +1531,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1529
1531
|
version: 2.0.0
|
1530
1532
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1531
1533
|
requirements:
|
1532
|
-
- - "
|
1534
|
+
- - ">="
|
1533
1535
|
- !ruby/object:Gem::Version
|
1534
|
-
version:
|
1536
|
+
version: '0'
|
1535
1537
|
requirements: []
|
1536
1538
|
rubyforge_project:
|
1537
|
-
rubygems_version: 2.
|
1539
|
+
rubygems_version: 2.6.8
|
1538
1540
|
signing_key:
|
1539
1541
|
specification_version: 4
|
1540
1542
|
summary: The easiest way to automate beta deployments and releases for your iOS and
|
1541
1543
|
Android apps
|
1542
1544
|
test_files: []
|
1545
|
+
has_rdoc:
|