2016-08-24 12:49:21 +05:30
|
|
|
desc 'Checks if migrations in a branch require downtime'
|
|
|
|
task downtime_check: :environment do
|
2016-09-13 17:45:13 +05:30
|
|
|
if defined?(Gitlab::License)
|
|
|
|
repo = 'gitlab-ee'
|
2016-08-24 12:49:21 +05:30
|
|
|
else
|
2016-09-13 17:45:13 +05:30
|
|
|
repo = 'gitlab-ce'
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
`git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
|
|
|
|
|
|
|
|
Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|