summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/dev.rake
blob: 5ee99dfc810163f1c86226b9c9d9d87fe9c882c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace :gitlab do
  namespace :dev do
    desc 'Checks if the branch would apply cleanly to EE'
    task ee_compat_check: :environment do
      return if defined?(Gitlab::License)
      return unless ENV['CI']

      success =
        Gitlab::EeCompatCheck.new(
          branch: ENV['CI_BUILD_REF_NAME'],
          check_dir: File.expand_path('ee-compat-check', __dir__),
          ce_repo: ENV['CI_BUILD_REPO']
        ).check

      if success
        exit 0
      else
        exit 1
      end
    end
  end
end