Add tps_v2 deploy function

This commit is contained in:
Xavier J 2016-10-25 12:03:25 +02:00
parent 7674eb23f0
commit e6c28fc9b2

View file

@ -11,7 +11,7 @@ require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# branch - Branch name to deploy. (needed by mina/git)
ENV['to'] ||= "staging"
ENV['to'] = "staging" unless ["staging", "production", "opensimplif"].include?(ENV['to'])
ENV['to'] = "staging" unless ["staging", "production", "opensimplif", "tps_v2"].include?(ENV['to'])
raise "missing domain, run with 'rake deploy domain=37.187.154.237'" if ENV['domain'].nil?
@ -51,13 +51,23 @@ elsif ENV["to"] == "opensimplif"
set :deploy_to, '/var/www/opensimplif'
set :user, 'opensimplif' # Username in the server to SSH to.
appname = 'opensimplif'
elsif ENV["to"] == "tps_v2"
if ENV['branch'].nil?
set :branch, 'tps_v2'
else
set :branch, ENV['branch']
end
set :deploy_to, '/var/www/tps_v2'
set :user, 'tps_v2' # Username in the server to SSH to.
appname = 'tps_v2'
end
set :rails_env, ENV["to"]
if ENV["to"] == "opensimplif"
set :rails_env, "production"
elsif ENV["to"] == "tps_v2"
set :rails_env, "production"
end
# For system-wide RVM install.