Skip to content
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

Remove extraneous files #531

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
#
# Exclude these files from release archives.
# This will also make them unavailable when using Composer with `--prefer-dist`.
# https://blog.madewithlove.be/post/gitattributes/
#
/tests export-ignore
/bin export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/psalm export-ignore
/.github export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.phpcsignore export-ignore
.travis.yml export-ignore
codecov.yml export-ignore
phpunit.xml.dist export-ignore
psalm.xml export-ignore
verify.txt export-ignore

#
# Auto detect text files and perform LF normalization
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
#
* text=auto

#
# The above will handle all files NOT found below
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we need to add this section?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor quality improvement if the package is pulled via Composer.

#
*.md text
*.php text
*.inc text
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: thedoctor0/zip-release@master
with:
filename: 'manual-install.zip'
exclusions: '*.git* *tests/ *tests/data/ *tests/* *tests/**/*'
exclusions: '*.git* *tests/ *tests/data/ *tests/* *tests/**/* *psalm/* *.phpcsignore *.yml *.xml *.xml.dist'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about not including XMl and yml files, though could be required by packages such as the aws-sdk etc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, these are not bundled in the release. I know that in WPCS we add these to .gitattributes. These are all development files that are usually not pulled when Composer is used but are present when you clone the repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right but that should be dependent on what the deps need. E.g. if we excluded .json files that would bread a lot of things, so I don't know for sure that excluding .xml and .yml is a good idea. How do we know that no Yaml / XML hires are needed for all the deps to work correctly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean, like from vendor files? I'm not sure this exclusion list would look at that (might be wrong tho).

But .yaml, .xml, .neon are usually all config files. I don't think any of the dependencies are using/bundling those.

I can remove the general file extensions, and add the specific files to exclude (config files), shouldn't be a problem.

path: '.'
directory: '.'

Expand Down