Permalink
Browse files

remove edge branch creation and only use master

  • Loading branch information...
1 parent 0e00494 commit b9700b8458fe0ba7f2517eacf316cf1290d1cf9e @pinguskahn pinguskahn committed Dec 18, 2008
Showing with 5 additions and 12 deletions.
  1. +3 −3 lib/railsmachine/recipes.rb
  2. +2 −9 lib/railsmachine/recipes/scm/git.rb
View
6 lib/railsmachine/recipes.rb
@@ -14,10 +14,10 @@
set :repository do
scm = fetch(:scm)
repos_base = "#{user}@#{domain}#{deploy_to}"
- if scm == :subversion
+ if scm.to_s == 'subversion'
"svn+ssh://#{repos_base}/repos/trunk"
- elsif scm == :git
- "ssh://#{repos_base}/repos"
+ elsif scm.to_s == 'git'
+ "ssh://#{repos_base}/repos/#{application}.git"
end
end
View
11 lib/railsmachine/recipes/scm/git.rb
@@ -5,7 +5,7 @@
desc "Setup directory structure and initialize git repository on remote server"
task :setup, :roles => :scm do
- dir = "#{deploy_to}/repos"
+ dir = "#{deploy_to}/repos/#{application}.git"
run "mkdir -p #{dir}"
sudo "chown -R #{user}:#{user} #{dir}"
run "cd #{dir} && git --bare init"
@@ -34,14 +34,7 @@
puts "Pushing application to the remote server. The name of the branch is:"
system "git remote"
system "git push origin master"
-
- puts "Creating edge branch on remote"
- system "git push origin master:refs/heads/edge"
- puts "create a local tracking edge branch"
- system "git branch --track edge origin/edge"
- puts "checking out edge repository"
- system "git checkout master"
-
+
puts "git setup complete"
puts "You can clone this repository with git clone #{repository} #{application}"
end

0 comments on commit b9700b8

Please sign in to comment.