Skip to content
Browse files

test update

  • Loading branch information...
1 parent 5025cd1 commit 50d2dc20ae9af6f58c441ab0f6fb46bb7994fb2c Sayem Islam committed May 14, 2012
Showing with 3 additions and 43 deletions.
  1. +0 −4 app/views/home/index.html.haml
  2. +3 −39 config/deploy.rb
View
4 app/views/home/index.html.haml
@@ -24,7 +24,3 @@
!= f[2].gsub(/(https?|ftp|file):\/\/\S+/) {|s| "<a href='#{s}' class='link' target='_blank'>#{s}</a>" }
%div#footer
- &copy; 2012
- |
- %a{:href => "http://github.com/sayem/startupfavs", :target => "_blank"}
- startupfavs on Github
View
42 config/deploy.rb
@@ -6,38 +6,25 @@
set :use_sudo, true
set :migrate_target, :current
-set :rails_env, "production"
+set :rails_env, "production"
set :deploy_to, "/home/sayem/htdocs/startupfavs"
-set :deploy_via, :copy
default_environment["RAILS_ENV"] = 'production'
set :scm, 'git'
set :repository, 'sayem@startupfavs.com:/home/sayem/htdocs/startupfavs/.git'
set :branch, 'master'
-set(:latest_release) { fetch(:current_path) }
-set(:release_path) { fetch(:current_path) }
-set(:current_release) { fetch(:current_path) }
-
namespace :deploy do
desc "Deploy your application"
task :default do
update
restart
end
- desc "Setup your git-based deployment app"
- task :setup, :except => { :no_release => true } do
- dirs = [deploy_to, shared_path]
- dirs += shared_children.map { |d| File.join(shared_path, d) }
- run "#{try_sudo} mkdir -p #{dirs.join(' ')} && #{try_sudo} chmod g+w #{dirs.join(' ')}"
- run "git clone #{repository} #{current_path}"
- end
-
desc "Zero-downtime restart of Unicorn"
task :restart, :except => { :no_release => true } do
- run "kill -s USR2 `cat /tmp/unicorn.my_site.pid`"
+ run "kill -s USR2 `cat /home/sayem/htdocs/startupfavs/tmp/pids/unicorn.pid`"
end
desc "Start unicorn"
@@ -47,29 +34,6 @@
desc "Stop unicorn"
task :stop, :except => { :no_release => true } do
- run "kill -s QUIT `cat /tmp/unicorn.my_site.pid`"
+ run "kill -s QUIT `cat /home/sayem/htdocs/startupfavs/tmp/pids/unicorn.pid`"
end
-
- namespace :rollback do
- desc "Moves the repo back to the previous version of HEAD"
- task :repo, :except => { :no_release => true } do
- set :branch, "HEAD@{1}"
- deploy.default
- end
-
- desc "Rewrite reflog so HEAD@{1} will continue to point to at the next previous release."
- task :cleanup, :except => { :no_release => true } do
- run "cd #{current_path}; git reflog delete --rewrite HEAD@{1}; git reflog delete --rewrite HEAD@{1}"
- end
-
- desc "Rolls back to the previously deployed version."
- task :default do
- rollback.repo
- rollback.cleanup
- end
- end
-end
-
-def run_rake(cmd)
- run "cd #{current_path}; #{rake} #{cmd}"
end

0 comments on commit 50d2dc2

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