Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Merge requests
!15
Issue
#3228806
: Exclude security hardened site/default
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3228806
: Exclude security hardened site/default
issue/automatic_updates-3228806:3228806-exclude-protected
into
8.x-2.x
Overview
0
Commits
24
Pipelines
0
Changes
2
Merged
Ted Bowman
requested to merge
issue/automatic_updates-3228806:3228806-exclude-protected
into
8.x-2.x
3 years ago
Overview
0
Commits
24
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
8.x-2.x
version 6
2649d8cd
3 years ago
version 5
cbabd3e1
3 years ago
version 4
26489ddc
3 years ago
version 3
d2d0ef26
3 years ago
version 2
58d8b56f
3 years ago
version 1
a8af6805
3 years ago
8.x-2.x (base)
and
latest version
latest version
2649d8cd
24 commits,
3 years ago
version 6
2649d8cd
24 commits,
3 years ago
version 5
cbabd3e1
23 commits,
3 years ago
version 4
26489ddc
20 commits,
3 years ago
version 3
d2d0ef26
19 commits,
3 years ago
version 2
58d8b56f
17 commits,
3 years ago
version 1
a8af6805
2 commits,
3 years ago
2 files
+
15
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Updater.php
+
14
−
7
Options
@@ -168,30 +168,37 @@ class Updater {
}
/**
* Gets
directorie
s that should be excluded from the staging area.
* Gets
the path
s that should be excluded from the staging area.
*
* @return string[]
* The
absolute paths of
director
ies
to exclude
from the staging area
.
* The
paths relative to the active
director
y
to exclude.
*/
private
function
getExclusions
():
array
{
$
directorie
s
=
[];
$
exclusion
s
=
[];
$make_relative
=
function
(
$path
)
{
return
str_replace
(
static
::
getActiveDirectory
()
.
'/'
,
''
,
$path
);
};
if
(
$public
=
$this
->
fileSystem
->
realpath
(
'public://'
))
{
$
directorie
s
[]
=
$make_relative
(
$public
);
$
exclusion
s
[]
=
$make_relative
(
$public
);
}
if
(
$private
=
$this
->
fileSystem
->
realpath
(
'private://'
))
{
$
directorie
s
[]
=
$make_relative
(
$private
);
$
exclusion
s
[]
=
$make_relative
(
$private
);
}
/** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
$module_handler
=
\Drupal
::
service
(
'module_handler'
);
$module_path
=
$this
->
fileSystem
->
realpath
(
$module_handler
->
getModule
(
'automatic_updates'
)
->
getPath
());
if
(
is_dir
(
"
$module_path
/.git"
))
{
// If the current module is git clone. Don't copy it.
$
directorie
s
[]
=
$make_relative
(
$module_path
);
$
exclusion
s
[]
=
$make_relative
(
$module_path
);
}
return
$directories
;
$settings_files
=
[
'settings.php'
,
'settings.local.php'
,
'services.yml'
];
foreach
(
$settings_files
as
$settings_file
)
{
$file_path
=
"sites/default/
$settings_file
"
;
if
(
file_exists
(
$file_path
))
{
$exclusions
[]
=
$make_relative
(
$this
->
fileSystem
->
realpath
(
"sites/default/
$settings_file
"
));
}
}
return
$exclusions
;
}
/**
Loading