Deploy: STAGE_NAME -> STAGE

This commit is contained in:
simon lehericey 2018-10-24 10:20:19 +02:00
parent 07ecb2509b
commit 9ee1119656
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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"