diff options
| author | Alban Peignier | 2017-09-13 14:42:36 +0200 |
|---|---|---|
| committer | Alban Peignier | 2017-09-13 14:54:06 +0200 |
| commit | 9f752f050b8dd5bdb63d6abb2d8b9a49d6e8ae78 (patch) | |
| tree | 6757ae4c672aa83bf97b713462c8a7ea8dcdf15e | |
| parent | 30e11dcea8a31ae1c28a55d222a70e9e3e9827bf (diff) | |
| download | chouette-core-9f752f050b8dd5bdb63d6abb2d8b9a49d6e8ae78.tar.bz2 | |
Disable deploy when not in master/staging or production. Refs #4468
| -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 90e47560e..e6fdee309 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" |
