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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5d3e9cde
Commit
5d3e9cde
authored
Feb 15, 2018
by
Rémy Coutable
Committed by
Robert Speicher
Feb 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scripts/ee-files-location-check to check wrong location of new EE-specific files
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
fc16493c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
.gitlab-ci.yml
.gitlab-ci.yml
+8
-0
scripts/ee-files-location-check
scripts/ee-files-location-check
+38
-0
No files found.
.gitlab-ci.yml
View file @
5d3e9cde
...
...
@@ -289,6 +289,14 @@ retrieve-tests-metadata:
-
wget -O $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH || rm $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
-
'
[[
-f
$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
]]
||
echo
"{}"
>
${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
ee-files-location-check
:
<<
:
*dedicated-runner
stage
:
prepare
before_script
:
[]
cache
:
{}
script
:
-
scripts/ee-files-location-check
update-tests-metadata
:
<<
:
*tests-metadata-state
<<
:
*only-canonical-masters
...
...
scripts/ee-files-location-check
0 → 100755
View file @
5d3e9cde
#!/usr/bin/env ruby
WHITELIST
=
%w[
CHANGELOG-EE.md
app/assets/javascripts/**/*
changelogs/unreleased-ee/**/*
config/**/*
doc/**/*
scripts/*
spec/javascripts/**/*
]
.
freeze
`git remote add canonical-ee https://gitlab.com/gitlab-org/gitlab-ee.git`
`git remote add canonical-ce https://gitlab.com/gitlab-org/gitlab-ce.git`
`git fetch canonical-ee master --quiet`
`git fetch canonical-ce master --quiet`
new_files_in_this_branch_not_at_the_ee_top_level
=
`git diff canonical-ee/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`
.
lines
.
map
(
&
:strip
)
ee_specific_files_in_ce_master_not_at_the_ee_top_level
=
`git diff canonical-ce/master...HEAD --name-status --diff-filter=A -- ./ ':!ee' | cut -f2`
.
lines
.
map
(
&
:strip
)
new_ee_specific_files_not_at_the_ee_top_level
=
new_files_in_this_branch_not_at_the_ee_top_level
&
ee_specific_files_in_ce_master_not_at_the_ee_top_level
status
=
0
new_ee_specific_files_not_at_the_ee_top_level
.
each
do
|
file
|
next
if
WHITELIST
.
any?
{
|
pattern
|
Dir
.
glob
(
pattern
).
include?
(
file
)
}
puts
puts
"*
#{
file
}
is EE-specific and should be moved to ee/
#{
file
}
:"
puts
" => git mv
#{
file
}
ee/
#{
file
}
"
status
=
1
end
`git remote remove canonical-ee`
`git remote remove canonical-ce`
exit
(
status
)
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