class FastlaneCore::FastlaneFolder
Constants
- FOLDER_NAME
Public Class Methods
create_folder!(path = nil)
click to toggle source
# File lib/fastlane_core/fastlane_folder.rb, line 29 def self.create_folder!(path = nil) path = File.join(path || '.', FOLDER_NAME) return if File.directory?(path) # directory is already there UI.user_error!("Found a file called 'fastlane' at path '#{path}', please delete it") if File.exist?(path) FileUtils.mkdir_p(path) UI.success "Created new folder '#{path}'." end
fastfile_path()
click to toggle source
Path to the Fastfile inside the fastlane folder. This is nil when none is available
# File lib/fastlane_core/fastlane_folder.rb, line 17 def self.fastfile_path path = File.join(self.path || '.', 'Fastfile') return path if File.exist?(path) return nil end
path()
click to toggle source
Path to the fastlane folder containing the Fastfile and other configuration files
# File lib/fastlane_core/fastlane_folder.rb, line 6 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
setup?()
click to toggle source
Does a fastlane configuration already exist?
# File lib/fastlane_core/fastlane_folder.rb, line 24 def self.setup? return false unless self.fastfile_path File.exist?(self.fastfile_path) end