mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
d6ae95e18c
Fallback to older rails I18n behaviour Silence deprecation warnings, for now Added code climate test reporter Created CI deployment task Added *all* the badges
22 lines
No EOL
549 B
Ruby
22 lines
No EOL
549 B
Ruby
namespace :ci do
|
|
task :deploy do
|
|
require 'rubygems'
|
|
require 'capistrano/all'
|
|
require 'capistrano/setup'
|
|
require 'capistrano/deploy'
|
|
|
|
if ci_branch = ENV['TRAVIS_BRANCH']
|
|
BRANCH_MAP = {
|
|
# 'master' => 'production'
|
|
'develop' => 'staging'
|
|
}
|
|
|
|
if BRANCH_MAP.include?(ci_branch)
|
|
Capistrano::Application.invoke(BRANCH_MAP[ci_branch])
|
|
Capistrano::Application.invoke("deploy")
|
|
end
|
|
else
|
|
raise "Failed to deploy: Rake task called outside of CI environment"
|
|
end
|
|
end
|
|
end |