small refactor
This commit is contained in:
parent
214ea3e5e2
commit
b87aa69a4b
|
|
@ -93,13 +93,8 @@ end
|
||||||
private_lane :syncCodeSigning do |options|
|
private_lane :syncCodeSigning do |options|
|
||||||
type = options[:type] || "development"
|
type = options[:type] || "development"
|
||||||
|
|
||||||
configurations_path = "./fastlane/configurations.yaml"
|
options_override = load_options_from("configurations.yaml")[type]
|
||||||
if File.exists? configurations_path
|
options.merge(options_override)
|
||||||
require "yaml"
|
|
||||||
|
|
||||||
configurations = YAML.load_file(configurations_path)
|
|
||||||
options.merge(configurations[type])
|
|
||||||
end
|
|
||||||
|
|
||||||
match(
|
match(
|
||||||
app_identifier: options[:app_identifier],
|
app_identifier: options[:app_identifier],
|
||||||
|
|
@ -131,3 +126,13 @@ private_lane :updateCodeSigning do |options|
|
||||||
options[:readonly] = false
|
options[:readonly] = false
|
||||||
syncCodeSigning(options)
|
syncCodeSigning(options)
|
||||||
end
|
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