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

Build system should strip unnecessary files from distributables #150

Closed
raamdev opened this issue Dec 21, 2016 · 4 comments
Closed

Build system should strip unnecessary files from distributables #150

raamdev opened this issue Dec 21, 2016 · 4 comments
Assignees
Labels

Comments

@raamdev
Copy link
Contributor

raamdev commented Dec 21, 2016

@jaswsinc writes (in Slack):

the ⁠⁠⁠⁠src/vendor/bin⁠⁠⁠⁠ directory (and contents) does not need to be in there. Things like ⁠⁠⁠⁠README.md⁠⁠⁠⁠, ⁠⁠⁠⁠CHANGELOG.md⁠⁠⁠⁠, ⁠⁠⁠⁠CHANGELOG.mdown⁠⁠⁠⁠, ⁠⁠⁠⁠README.mdown⁠⁠⁠⁠, ⁠⁠⁠⁠.php_cs⁠⁠⁠⁠, ⁠⁠⁠⁠circle.yml⁠⁠⁠⁠, ⁠⁠⁠⁠.travis-scripts⁠⁠⁠⁠, ⁠⁠⁠⁠.gitkeep⁠⁠⁠⁠, ⁠⁠⁠⁠phpunit.xml⁠⁠⁠⁠, ⁠⁠⁠⁠phpunit.xml.dist⁠⁠⁠⁠, and ⁠⁠⁠⁠Makefile⁠⁠⁠⁠ in some of the dependency directories do not need to be in the final distro either.

In the Lite build, many of the additional dependencies are in there, even though we added support for ⁠⁠⁠⁠require-lite:{}⁠⁠⁠⁠ in ⁠⁠⁠⁠composer.json⁠⁠⁠⁠ via the Phing build system. So this part is not working in the Phing build system.

Related: #146
Related: #141

@raamdev
Copy link
Contributor Author

raamdev commented Dec 21, 2016

We should be excluding from the final distributables anything in the src/ directory that is not necessary for the plugin to run, e.g., src/vendor/monolog/monolog/doc/ and (maybe?) src/vendor/symfony/debug/.

@raamdev
Copy link
Contributor Author

raamdev commented Dec 21, 2016

Noting also that we do have the project_other_zip_tgz_fileset_exclusions property in the .build.props file that could be used to ensure certain files/directories are excluded from the distributable, so maybe we just need to keep the exclusions there more up-to-date?

@jaswrks
Copy link
Contributor

jaswrks commented Dec 21, 2016

I think if it's something fairly common and easy for us to exclude across all builds for any project, then we should try to do that. An example would be a directory with the name /tests/, which we exclude already. I think a directory named /debug/ or /doc/ could lead us to false-positives in other projects, so those would be good candidates for project_other_zip_tgz_fileset_exclusions.

jaswrks pushed a commit that referenced this issue Dec 21, 2016
@jaswrks
Copy link
Contributor

jaswrks commented Dec 21, 2016

@raamdev See d8ab74b where I've added some additional patterns that are now excluded from all builds, across all projects.

@jaswrks jaswrks closed this as completed Dec 21, 2016
jaswrks pushed a commit to wpsharks/dotfiles that referenced this issue Dec 21, 2016
jaswrks pushed a commit to wpsharks/dotfiles that referenced this issue Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants