Skip to content

Instantly share code, notes, and snippets.

@albertohm
Created February 11, 2014 00:42
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 albertohm/8927232 to your computer and use it in GitHub Desktop.
Save albertohm/8927232 to your computer and use it in GitHub Desktop.
simple-deployer.rb
require 'rubygems'
require 'sinatra'
get '/' do
"Leave this place"
end
# Pass in the repo name and deploy that shit
get '/deploy/:name/:branch' do
command = "cap -s env='staging' branch='#{params[:branch]}' deploy"
bb = IO.popen("cd ~/Desktop/deploy_repos/"+params[:name]+"; git pull origin master; #{command}")
b = bb.readlines
puts b.join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment