2016-09-29 13:31:14 -04:00
|
|
|
namespace :gitlab do
|
|
|
|
namespace :dev do
|
|
|
|
desc 'Checks if the branch would apply cleanly to EE'
|
2016-10-28 12:13:59 -04:00
|
|
|
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'] }
|
2016-10-28 12:13:59 -04:00
|
|
|
else
|
|
|
|
unless args[:branch]
|
|
|
|
puts "Must specify a branch as an argument".color(:red)
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
args
|
|
|
|
end
|
2016-10-07 11:21:51 -04:00
|
|
|
|
2016-10-28 12:13:59 -04:00
|
|
|
if Gitlab::EeCompatCheck.new(opts || {}).check
|
2016-10-17 12:52:14 -04:00
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
exit 1
|
2016-09-29 13:31:14 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|