Commit 992dfd7e authored by Rémy Coutable's avatar Rémy Coutable

Fetch CE/branch before running `git apply --check --3way patch`

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 3d44ec3f
......@@ -131,10 +131,12 @@ module Gitlab
def check_patch(patch_path)
step("Checking out master", %w[git checkout master])
step("Resetting to latest master", %w[git reset --hard origin/master])
step("Fetching CE/#{branch}", %W[git fetch #{CE_REPO} #{branch}])
step(
"Checking if #{patch_path} applies cleanly to EE/master",
%W[git apply --check --3way #{patch_path}]
) do |output, status|
puts output
unless status.zero?
@failed_files = output.lines.reduce([]) do |memo, line|
if line.start_with?('error: patch failed:')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment