2016-06-24 12:29:23 -04:00
|
|
|
desc 'Checks if migrations in a branch require downtime'
|
|
|
|
task downtime_check: :environment do
|
2017-02-22 13:18:40 -05:00
|
|
|
repo = if defined?(Gitlab::License)
|
|
|
|
'gitlab-ee'
|
|
|
|
else
|
|
|
|
'gitlab-ce'
|
|
|
|
end
|
2016-06-24 12:29:23 -04:00
|
|
|
|
2016-08-02 05:56:47 -04:00
|
|
|
`git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
|
|
|
|
|
|
|
|
Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
|
2016-06-24 12:29:23 -04:00
|
|
|
end
|