Skip to content

Instantly share code, notes, and snippets.

@felipero
Created March 23, 2010 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipero/341503 to your computer and use it in GitHub Desktop.
Save felipero/341503 to your computer and use it in GitHub Desktop.
def remote_setup
if branch.eql? "master"
checkout = ""
else
checkout = "&& $(git branch | grep -vq #{branch}) && git checkout -f -b #{branch} origin/#{branch}"
end
remote_run "cd #{path} && #{@sudo}git clone --depth 1 #{repository} #{application} && cd #{application} #{checkout}"
install_gems
remote_run "#{@sudo}rake inploy:setup environment=#{environment}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment