docs: add some comments
This commit is contained in:
parent
385e7c05a9
commit
289802d9bc
@ -41,27 +41,30 @@ module Fastlane
|
|||||||
UI.user_error!("❌ Ios credentials doesn't exist")
|
UI.user_error!("❌ Ios credentials doesn't exist")
|
||||||
puts("json file doesn't exist")
|
puts("json file doesn't exist")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.check_required_fields(required_fields, json)
|
# Check json fields
|
||||||
missing_fields = required_fields - json
|
def self.check_required_fields(required_fields, json)
|
||||||
|
missing_fields = required_fields - json
|
||||||
|
|
||||||
unless missing_fields.empty?
|
unless missing_fields.empty?
|
||||||
raise ArgumentError, "❌ missing keys in credential json file : #{missing_fields}"
|
raise ArgumentError, "❌ missing keys in credential json file : #{missing_fields}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Check if set of environment variables are defined
|
||||||
|
def self.check_environment_variables(variables)
|
||||||
|
variables.each do |variable|
|
||||||
|
unless ENV.key?(variable)
|
||||||
|
raise "❌ The environment variable '#{variable}' is not defined."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.check_environment_variables(variables)
|
# Delete built files
|
||||||
variables.each do |variable|
|
def self.delete_artifacts(artifacts)
|
||||||
unless ENV.key?(variable)
|
artifacts.each do |file|
|
||||||
raise "❌ The environment variable '#{variable}' is not defined."
|
File.delete(file) if File.exist?(file)
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.delete_artifacts(artifacts)
|
|
||||||
artifacts.each do |file|
|
|
||||||
File.delete(file) if File.exist?(file)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user