BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e69924c4
Unverified
Commit
e69924c4
authored
Jun 13, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an uncaught throw in the ee_compat_check job
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
6a3049d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
ee_compat_check.rb
lib/gitlab/ee_compat_check.rb
+17
-4
No files found.
lib/gitlab/ee_compat_check.rb
View file @
e69924c4
...
...
@@ -76,9 +76,13 @@ module Gitlab
step
(
"Generating the patch against origin/master in
#{
patch_path
}
"
,
%
W[git diff --binary origin/master >
#{
patch_path
}
]
%
w[git diff --binary origin/master...HEAD
]
)
do
|
output
,
status
|
throw
(
:halt_check
,
:ko
)
unless
status
.
zero?
&&
File
.
exist?
(
patch_path
)
throw
(
:halt_check
,
:ko
)
unless
status
.
zero?
File
.
write
(
patch_path
,
output
)
throw
(
:halt_check
,
:ko
)
unless
File
.
exist?
(
patch_path
)
end
end
...
...
@@ -130,7 +134,15 @@ module Gitlab
step
(
"Fetching CE/
#{
ce_branch
}
"
,
%W[git fetch
#{
CE_REPO
}
#{
ce_branch
}
]
)
step
(
"Checking if
#{
patch_path
}
applies cleanly to EE/master"
,
%W[git apply --check --3way
#{
patch_path
}
]
# Don't use --check here because it can result in a 0-exit status even
# though the patch doesn't apply cleanly, e.g.:
# > git apply --check --3way foo.patch
# error: patch failed: lib/gitlab/ee_compat_check.rb:74
# Falling back to three-way merge...
# Applied patch to 'lib/gitlab/ee_compat_check.rb' with conflicts.
# > echo $?
# 0
%W[git apply --3way
#{
patch_path
}
]
)
do
|
output
,
status
|
puts
output
unless
status
.
zero?
...
...
@@ -145,6 +157,7 @@ module Gitlab
status
=
0
if
failed_files
.
empty?
end
command
(
%w[git reset --hard]
)
status
end
end
...
...
@@ -292,7 +305,7 @@ module Gitlab
# In the CE repo
$ git fetch origin master
$ git diff --binary origin/master >
#{
ce_branch
}
.patch
$ git diff --binary origin/master
...HEAD --
>
#{
ce_branch
}
.patch
# In the EE repo
$ git fetch origin master
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment