-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.rb
33 lines (26 loc) · 905 Bytes
/
deploy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
set :to, ENV['to'] || 'production'
set :application, "jubilator"
set :revision, ENV['REV'] || 'origin/master'
set :timestamp, Time.now.strftime("%Y%m%d%H%M%S")
# set :repository, "git://github.com/#{user}/jubilator.git"
# set :deploy_to, "/path/to/#{application}"
# host 'user@hostname', :db, :app
require "#{to}"
#
# Routine tasks
namespace :deploy do
remote_task :symlink_configs, :roles => :app do
tracking_path = "public/javascripts/tracking.js"
run "ln -nfs #{shared_path}/#{tracking_path} #{latest_release}/#{tracking_path}"
end
end
remote_task 'vlad:update_symlinks', :roles => :app do
Rake::Task['deploy:symlink_configs'].invoke
end
desc "Deploys the latest set of code (use this most often)"
task 'vlad:deploy' => ['vlad:update', 'vlad:cleanup']
#
# One time tasks
remote_task 'vlad:setup_app', :roles => :app do
# run "mkdir #{shared_path}/something"
end