-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#678] Updated .gitignore
configs.
#679
Conversation
@@ -0,0 +1,17 @@ | |||
# Drupal editor configuration normalization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing this file in a template allows to have a "place" to put additional editor configurations.
@@ -1,4 +1,7 @@ | |||
# Ignore directories generated by Composer | |||
# To ignore OS temporary files use global .gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local-specific overrides should be managed by users themselves using a global .gitignore
. Ignoring vendor-specific entries make this selection biased, so it is better to exclude them from the list. The entries removed below.
/web/sites/*/settings.php | ||
/web/sites/*/settings.local.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and missed services.local.yml
files are now managed with Drupal Scaffold .gitignore
files created during composer install
.
2cdee71
to
b08e7c8
Compare
|
||
# Manage all .gitignore files with Drupal scaffold. | ||
# Remove the line below and commit the files for more granular control. | ||
**/.gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drupal Scaffold now provides .gitignore
files for every directory used by contribs. This template now suggests relying on Drupal Scaffold to manage those ignores rather than managing them in consumer projects (which is, subjectively, easier to maintain).
@@ -63,6 +63,11 @@ | |||
"extra": { | |||
"composer-exit-on-patch-failure": true, | |||
"drupal-scaffold": { | |||
"file-mapping": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important section
@@ -63,6 +63,11 @@ | |||
"extra": { | |||
"composer-exit-on-patch-failure": true, | |||
"drupal-scaffold": { | |||
"file-mapping": { | |||
"[project-root]/.gitignore": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .gitignore
provided by this template replaces the .gitignore
provided by Drupal scaffold as an "example" since our files is an "extended example".
@@ -63,6 +63,11 @@ | |||
"extra": { | |||
"composer-exit-on-patch-failure": true, | |||
"drupal-scaffold": { | |||
"file-mapping": { | |||
"[project-root]/.gitignore": false, | |||
"[web-root]/INSTALL.txt": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly exclude both INSTALL and README as these files have been reported to be a source of identification of the Drupal version (on misconfigured servers), that opens an additional attack vector.
Wow this is great stuff. Proper work and superbe comments! 👌🏻 |
Closes #678
This PR updates the root
.gitignore
managed by this project to "offload" scaffold files management, including exclusions of the contrib scaffold files, to Drupal Scaffold to minimise the maintenance effort for the consumer sites.Please note that Drupal Scaffold now provides
.gitignore
files that exclude contrib directories. This PR tries to rely on the files provided by the Drupal Scaffold and only override what is really necessary for granular control within consumer projects.Below is a table describing:
DS == Drupal Scaffold
DP == Drupal Project (this template)
C == Consumer site
Please see inline comments for suggested changes.