gitlab-org--gitlab-foss/lib/tasks/gitlab/dev.rake

24 lines
542 B
Ruby
Raw Normal View History

namespace :gitlab do
namespace :dev do
desc 'Checks if the branch would apply cleanly to EE'
task :ee_compat_check, [:branch] => :environment do |_, args|
opts =
if ENV['CI']
2017-03-10 05:20:08 -05:00
{ branch: ENV['CI_COMMIT_REF_NAME'] }
else
unless args[:branch]
puts "Must specify a branch as an argument".color(:red)
exit 1
end
args
end
if Gitlab::EeCompatCheck.new(opts || {}).check
exit 0
else
exit 1
end
end
end
end