Sha256: eecd0eeca7e5cd2d7c48f9b7d0264e04444bd5e1e0e65be6505954185a5c42e6
Contents?: true
Size: 1.05 KB
Versions: 56
Compression:
Stored size: 1.05 KB
Contents
module Fastlane class FastlaneFolder FOLDER_NAME = 'fastlane' # Path to the fastlane folder containing the Fastfile and other configuration files def self.path value ||= "./#{FOLDER_NAME}/" if File.directory?("./#{FOLDER_NAME}/") value ||= "./.#{FOLDER_NAME}/" if File.directory?("./.#{FOLDER_NAME}/") # hidden folder value ||= "./" if File.basename(Dir.getwd) == FOLDER_NAME && File.exist?('Fastfile') # inside the folder value ||= "./" if File.basename(Dir.getwd) == ".#{FOLDER_NAME}" && File.exist?('Fastfile') # inside the folder and hidden value = nil if Helper.is_test? # this is required, as the tests would use the ./fastlane folder otherwise return value end # Does a fastlane configuration already exist? def self.setup? return false unless path File.exist?(File.join(path, "Fastfile")) end def self.create_folder!(path = nil) path = File.join(path || '.', FOLDER_NAME) FileUtils.mkdir_p(path) Helper.log.info "Created new folder '#{path}'.".green end end end
Version data entries
56 entries across 56 versions & 1 rubygems