Improve deploy.rb readability
This commit is contained in:
parent
276cb55d9a
commit
ec545758c3
1 changed files with 6 additions and 2 deletions
|
@ -11,9 +11,13 @@ require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
|
||||||
# branch - Branch name to deploy. (needed by mina/git)
|
# branch - Branch name to deploy. (needed by mina/git)
|
||||||
|
|
||||||
ENV['to'] ||= "staging"
|
ENV['to'] ||= "staging"
|
||||||
raise "Bad to=#{+ENV['to']}" if !["staging", "production"].include?(ENV['to'])
|
if !["staging", "production"].include?(ENV['to'])
|
||||||
|
raise "Bad to=#{+ENV['to']}"
|
||||||
|
end
|
||||||
|
|
||||||
raise "missing domain, run with 'rake deploy domain=37.187.154.237'" if ENV['domain'].nil?
|
if ENV['domain'].nil?
|
||||||
|
raise "missing domain, run with 'rake deploy domain=37.187.154.237'"
|
||||||
|
end
|
||||||
|
|
||||||
set :domain, ENV['domain']
|
set :domain, ENV['domain']
|
||||||
set :repository, 'https://github.com/betagouv/tps.git'
|
set :repository, 'https://github.com/betagouv/tps.git'
|
||||||
|
|
Loading…
Add table
Reference in a new issue