small refactor
This commit is contained in:
parent
214ea3e5e2
commit
b87aa69a4b
|
|
@ -93,13 +93,8 @@ end
|
|||
private_lane :syncCodeSigning do |options|
|
||||
type = options[:type] || "development"
|
||||
|
||||
configurations_path = "./fastlane/configurations.yaml"
|
||||
if File.exists? configurations_path
|
||||
require "yaml"
|
||||
|
||||
configurations = YAML.load_file(configurations_path)
|
||||
options.merge(configurations[type])
|
||||
end
|
||||
options_override = load_options_from("configurations.yaml")[type]
|
||||
options.merge(options_override)
|
||||
|
||||
match(
|
||||
app_identifier: options[:app_identifier],
|
||||
|
|
@ -131,3 +126,13 @@ private_lane :updateCodeSigning do |options|
|
|||
options[:readonly] = false
|
||||
syncCodeSigning(options)
|
||||
end
|
||||
|
||||
def load_options_from(file_path)
|
||||
if File.exists? file_path
|
||||
require "yaml"
|
||||
|
||||
return YAML.load_file(file_path)
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue