Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

can't hurt to make this settable

Not every developer likes having everything under workspace.  That might make sense at
Pivotal, but there is no reason not to set it as an attribute, right?
  • Loading branch information...
commit 7aa09b4c3a259f8a23715fa2e315af385d9de93a 1 parent 4f20f35
@timocratic timocratic authored
View
1  attributes/workspace_directory.rb
@@ -0,0 +1 @@
+node.default["workspace_directory"]="workspace"
View
12 recipes/git_projects.rb
@@ -1,28 +1,28 @@
-include_recipe "pivotal_workstation::workspace_directory"
+include_recipe "ccd_workstation::workspace_directory"
node.git_projects.each do |repo_name, repo_address|
execute "clone #{repo_name}" do
command "git clone #{repo_address} #{repo_name}"
user WS_USER
- cwd "#{WS_HOME}/workspace/"
- not_if { ::File.exists?("#{WS_HOME}/workspace/#{repo_name}") }
+ cwd "#{WS_HOME}/#{node['workspace_directory']}/"
+ not_if { ::File.exists?("#{WS_HOME}/#{node['workspace_directory']}/#{repo_name}") }
end
execute "track origin master" do
command "git branch --set-upstream master origin/master"
- cwd "#{WS_HOME}/workspace/#{repo_name}"
+ cwd "#{WS_HOME}/#{node['workspace_directory']}/#{repo_name}"
user WS_USER
end
execute "git submodule init for #{repo_name}" do
command "git submodule init"
- cwd "#{WS_HOME}/workspace/#{repo_name}"
+ cwd "#{WS_HOME}/#{node['workspace_directory']}/#{repo_name}"
user WS_USER
end
execute "git submodule update for #{repo_name}" do
command "git submodule update"
- cwd "#{WS_HOME}/workspace/#{repo_name}"
+ cwd "#{WS_HOME}/#{node['workspace_directory']}/#{repo_name}"
user WS_USER
end
end
View
4 recipes/workspace_directory.rb
@@ -1,5 +1,5 @@
-directory "#{WS_HOME}/workspace" do
+directory "#{WS_HOME}/#{node["workspace_directory"]}" do
owner WS_USER
mode "0755"
action :create
-end
+end

0 comments on commit 7aa09b4

Please sign in to comment.
Something went wrong with that request. Please try again.