Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
98b87a6e
Commit
98b87a6e
authored
Mar 23, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put banners in constants
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
8720f1d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
29 deletions
+27
-29
lib/gitlab/ee_compat_check.rb
lib/gitlab/ee_compat_check.rb
+27
-29
No files found.
lib/gitlab/ee_compat_check.rb
View file @
98b87a6e
...
@@ -6,6 +6,16 @@ module Gitlab
...
@@ -6,6 +6,16 @@ module Gitlab
EE_REPO
=
'https://gitlab.com/gitlab-org/gitlab-ee.git'
.
freeze
EE_REPO
=
'https://gitlab.com/gitlab-org/gitlab-ee.git'
.
freeze
CHECK_DIR
=
Rails
.
root
.
join
(
'ee_compat_check'
)
CHECK_DIR
=
Rails
.
root
.
join
(
'ee_compat_check'
)
IGNORED_FILES_REGEX
=
/(VERSION|CHANGELOG\.md:\d+)/
.
freeze
IGNORED_FILES_REGEX
=
/(VERSION|CHANGELOG\.md:\d+)/
.
freeze
PLEASE_READ_THIS_BANNER
=
%Q{
============================================================
===================== PLEASE READ THIS =====================
============================================================
}
.
freeze
THANKS_FOR_READING_BANNER
=
%Q{
============================================================
==================== THANKS FOR READING ====================
============================================================
\n
}
.
freeze
attr_reader
:ee_repo_dir
,
:patches_dir
,
:ce_repo
,
:ce_branch
,
:ee_branch_found
attr_reader
:ee_repo_dir
,
:patches_dir
,
:ce_repo
,
:ce_branch
,
:ee_branch_found
attr_reader
:failed_files
attr_reader
:failed_files
...
@@ -239,37 +249,31 @@ module Gitlab
...
@@ -239,37 +249,31 @@ module Gitlab
end
end
def
applies_cleanly_msg
(
branch
)
def
applies_cleanly_msg
(
branch
)
<<-
MSG
.
strip_heredoc
%Q{
============================================================
#{
PLEASE_READ_THIS_BANNER
}
===================== PLEASE READ THIS =====================
============================================================
🎉 Congratulations!! 🎉
🎉 Congratulations!! 🎉
The
#{
branch
}
branch applies cleanly to EE/master!
The
`
#{
branch
}
`
branch applies cleanly to EE/master!
Much ❤️! For more information, see
Much ❤️! For more information, see
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
============================================================
#{
THANKS_FOR_READING_BANNER
}
==================== THANKS FOR READING ====================
}
============================================================
\n
MSG
end
end
def
ce_branch_doesnt_apply_cleanly_and_no_ee_branch_msg
def
ce_branch_doesnt_apply_cleanly_and_no_ee_branch_msg
<<-
MSG
.
strip_heredoc
%Q{
============================================================
#{
PLEASE_READ_THIS_BANNER
}
===================== PLEASE READ THIS =====================
============================================================
💥 Oh no! 💥
💥 Oh no! 💥
The
#{
ce_branch
}
branch does not apply cleanly to the current
The
`
#{
ce_branch
}
`
branch does not apply cleanly to the current
EE/master, and no `
#{
ee_branch_prefix
}
` or `
#{
ee_branch_suffix
}
` branch
EE/master, and no `
#{
ee_branch_prefix
}
` or `
#{
ee_branch_suffix
}
` branch
was found in the EE repository.
was found in the EE repository.
#{
conflicting_files_msg
}
#{
conflicting_files_msg
}
We advise you to create a `
#{
ee_branch_prefix
}
` or `
#{
ee_branch_suffix
}
`
We advise you to create a `
#{
ee_branch_prefix
}
` or `
#{
ee_branch_suffix
}
`
branch that includes changes from
#{
ce_branch
}
but also specific changes
branch that includes changes from
`
#{
ce_branch
}
`
but also specific changes
than can be applied cleanly to EE/master. In some cases, the conflicts
than can be applied cleanly to EE/master. In some cases, the conflicts
are trivial and you can ignore the warning from this job. As always,
are trivial and you can ignore the warning from this job. As always,
use your best judgment!
use your best judgment!
...
@@ -284,7 +288,7 @@ module Gitlab
...
@@ -284,7 +288,7 @@ module Gitlab
$ git fetch
#{
ce_repo
}
#{
ce_branch
}
$ git fetch
#{
ce_repo
}
#{
ce_branch
}
$ git cherry-pick SHA # Repeat for all the commits you want to pick
$ git cherry-pick SHA # Repeat for all the commits you want to pick
You can squash the
#{
ce_branch
}
commits into a single "Port of
#{
ce_branch
}
to EE" commit.
You can squash the
`
#{
ce_branch
}
`
commits into a single "Port of
#{
ce_branch
}
to EE" commit.
2. Apply your branch's patch to EE
2. Apply your branch's patch to EE
...
@@ -318,20 +322,16 @@ module Gitlab
...
@@ -318,20 +322,16 @@ module Gitlab
Stay 💪 ! For more information, see
Stay 💪 ! For more information, see
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
============================================================
#{
THANKS_FOR_READING_BANNER
}
==================== THANKS FOR READING ====================
}
============================================================
\n
MSG
end
end
def
ee_branch_doesnt_apply_cleanly_msg
def
ee_branch_doesnt_apply_cleanly_msg
<<-
MSG
.
strip_heredoc
%Q{
============================================================
#{
PLEASE_READ_THIS_BANNER
}
===================== PLEASE READ THIS =====================
============================================================
💥 Oh no! 💥
💥 Oh no! 💥
The
#{
ce_branch
}
does not apply cleanly to the current EE/master, and
The
`
#{
ce_branch
}
`
does not apply cleanly to the current EE/master, and
even though a `
#{
ee_branch_found
}
` branch
even though a `
#{
ee_branch_found
}
` branch
exists in the EE repository, it does not apply cleanly either to
exists in the EE repository, it does not apply cleanly either to
EE/master!
EE/master!
...
@@ -343,10 +343,8 @@ module Gitlab
...
@@ -343,10 +343,8 @@ module Gitlab
Stay 💪 ! For more information, see
Stay 💪 ! For more information, see
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
https://docs.gitlab.com/ce/development/limit_ee_conflicts.html#check-the-rake-ee_compat_check-in-your-merge-requests
============================================================
#{
THANKS_FOR_READING_BANNER
}
==================== THANKS FOR READING ====================
}
============================================================
\n
MSG
end
end
def
conflicting_files_msg
def
conflicting_files_msg
...
...
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