Method: DeployGate::Xcode::Ios.find_workspaces

Defined in:
lib/deploygate/xcode/ios.rb

.find_workspaces(base_path) ⇒ Array

Parameters:

  • base_path (String)
  • current_only (Boolean)

Returns:

  • (Array)


87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/deploygate/xcode/ios.rb', line 87

def find_workspaces(base_path)
  projects = []
  Find.find(base_path) do |path|
    next if path == base_path
    if File.extname(path) == WORK_DIR_EXTNAME
      projects.push(path)
    end

    Find.prune if FileTest.directory?(path) && IGNORE_DIRS.include?(File.basename(path))
  end

  projects
end