diff options
Diffstat (limited to 'lib/tasks/gitlab/dev.rake')
-rw-r--r-- | lib/tasks/gitlab/dev.rake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/dev.rake b/lib/tasks/gitlab/dev.rake new file mode 100644 index 00000000000..3117075b08b --- /dev/null +++ b/lib/tasks/gitlab/dev.rake @@ -0,0 +1,26 @@ +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'] + { + branch: ENV['CI_BUILD_REF_NAME'], + ce_repo: ENV['CI_BUILD_REPO'] + } + 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 |