debian-mirror-gitlab/lib/tasks/downtime_check.rake
2021-03-11 19:13:27 +05:30

15 lines
369 B
Ruby

# frozen_string_literal: true
desc 'Checks if migrations in a branch require downtime'
task downtime_check: :environment do
repo = if defined?(Gitlab::License)
'gitlab'
else
'gitlab-foss'
end
`git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1`
Rake::Task['gitlab:db:downtime_check'].invoke('FETCH_HEAD')
end