diff options
| author | Alban Peignier | 2017-09-13 14:42:36 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2017-09-13 14:42:36 +0200 | 
| commit | 87ecd0d5585c2cb0ebe3f37735883d617909bf4c (patch) | |
| tree | ebcef38811366ae608f4241ba168bc60f4a0439c /lib/tasks | |
| parent | 12b2c712924048783609ae1c8e4b654b81b4d519 (diff) | |
| download | chouette-core-87ecd0d5585c2cb0ebe3f37735883d617909bf4c.tar.bz2 | |
Disable deploy when not in master/staging or production. Refs #4468
Diffstat (limited to 'lib/tasks')
| -rw-r--r-- | lib/tasks/ci.rake | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 69f5f9ca8..7fe289ed6 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -19,7 +19,11 @@ namespace :ci do    end    def deploy_env -    git_branch.in?(deploy_envs) ? git_branch : "dev" +    if git_branch == "master" +      "dev" +    elsif git_branch.in?(deploy_envs) +      git_branch +    end    end    desc "Check security aspects" @@ -37,7 +41,11 @@ namespace :ci do    desc "Deploy after CI"    task :deploy do -    sh "cap #{deploy_env} deploy:migrations" +    if deploy_env +      sh "cap #{deploy_env} deploy:migrations" +    else +      puts "No deploy for branch #{git_branch}" +    end    end    desc "Clean test files" | 
