Method: MTBuild::Workspace#add_workspace
- Defined in:
- lib/mtbuild/workspace.rb
#add_workspace(workspace_location, pull_default_tasks: false, pull_configurations: [], push_configurations: []) ⇒ Object
Adds a workspace subfolder
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/mtbuild/workspace.rb', line 81 def add_workspace(workspace_location, pull_default_tasks: false, pull_configurations: [], push_configurations: []) new_workspaces = [] Utils.(workspace_location, @workspace_folder).each do |workspace_path| if File.directory? workspace_path workspace_rakefile = MTBuild::Workspace.find_build_file(workspace_path) unless workspace_rakefile.nil? new_workspaces << { :build_file=>workspace_rakefile, :pull_tasks=>pull_default_tasks, :pull_cfg=>pull_configurations, :push_cfg=>push_configurations } end end end $stderr.puts "Could not find a valid workspace at '#{workspace_location}'. Ignored." if new_workspaces.empty? @workspaces += new_workspaces end |