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

Conversation

dingo-d
Copy link

@dingo-d dingo-d commented Jun 23, 2021

This PR will remove unnecessary files for production release (psalm, configuration files, etc.)

Exclude unnecessary files and folders from the release
Exclude unnecessary files and folders from the release
@@ -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.

* 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants