BigW Consortium Gitlab

dev.rake 541 Bytes
Newer Older
1 2 3
namespace :gitlab do
  namespace :dev do
    desc 'Checks if the branch would apply cleanly to EE'
4 5 6
    task :ee_compat_check, [:branch] => :environment do |_, args|
      opts =
        if ENV['CI']
7
          { branch: ENV['CI_BUILD_REF_NAME'] }
8 9 10 11 12 13 14
        else
          unless args[:branch]
            puts "Must specify a branch as an argument".color(:red)
            exit 1
          end
          args
        end
15

16
      if Gitlab::EeCompatCheck.new(opts || {}).check
17 18 19
        exit 0
      else
        exit 1
20 21 22 23
      end
    end
  end
end