From 916dd17873470f6cfb8f50d2d55b146d6f0148c5 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Wed, 24 Oct 2018 16:00:07 +0200 Subject: [PATCH] =?UTF-8?q?domains=5Ffrom=5Fenv=20=E2=86=92=20domains=5Ffo?= =?UTF-8?q?r=5Fstage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/deploy.rake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tasks/deploy.rake b/lib/tasks/deploy.rake index 749c22d74..06fa84348 100644 --- a/lib/tasks/deploy.rake +++ b/lib/tasks/deploy.rake @@ -1,16 +1,16 @@ -def domains_from_env(env) - case env +def domains_for_stage(stage) + case stage when 'dev' ['web1.dev', 'web2.dev'] when 'prod' ['web1', 'web2'] else - raise "STAGE #{env} is unknown. It must be either dev or prod" + raise "STAGE #{stage} is unknown. It must be either dev or prod." end end task :deploy do - domains = domains_from_env(ENV.fetch('STAGE')) + domains = domains_for_stage(ENV.fetch('STAGE')) branch = ENV.fetch('BRANCH') domains.each do |domain| @@ -19,7 +19,7 @@ task :deploy do end task :setup do - domains = domains_from_env(ENV['STAGE']) + domains = domains_for_stage(ENV.fetch('STAGE')) domains.each do |domain| sh "mina setup domain=#{domain} force_asset_precompile=true"