Sha256: ada6ae3c9e4f2b58caf62d1e475a93137f70896c0dfabcfb11109e0304064ebb
Contents?: true
Size: 1.04 KB
Versions: 23
Compression:
Stored size: 1.04 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) UI.success "Created new folder '#{path}'." end end end
Version data entries
23 entries across 23 versions & 1 rubygems