Deploy: STAGE_NAME -> STAGE
This commit is contained in:
parent
07ecb2509b
commit
9ee1119656
2 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@ require 'mina/rbenv'
|
|||
# forward_agent - SSH forward_agent
|
||||
# user - Username in the server to SSH to
|
||||
|
||||
|
||||
if ENV['domain'].nil?
|
||||
raise "missing `domain`"
|
||||
end
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
task :deploy do
|
||||
domains = case ENV['STAGE_NAME']
|
||||
domains = case ENV['STAGE']
|
||||
when 'dev'
|
||||
['web1.dev', 'web2.dev']
|
||||
when 'master'
|
||||
['web1', 'web2']
|
||||
else
|
||||
raise "STAGE_NAME #{STAGE_NAME} is unknown. It must be either dev or master"
|
||||
raise "STAGE #{STAGE} is unknown. It must be either dev or master"
|
||||
end
|
||||
|
||||
branch = ENV['STAGE_NAME']
|
||||
branch = ENV['STAGE']
|
||||
|
||||
domains.each do |domain|
|
||||
sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true"
|
||||
|
|
Loading…
Reference in a new issue