Skip to content

Commit

Permalink
Exclude specific files from archives
Browse files Browse the repository at this point in the history
By adding files to `archive.exclude` within `composer.json`, the dist
package is kept clean when composer is generating an archive. However,
Github also creates a dist file, using `.gitattributes`. Hence, the
exclude rules are copied over to `.gitattributes`.
  • Loading branch information
Jan-Marten de Boer committed Jul 23, 2018
1 parent 592ce0b commit 31dc0b9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/grumphp.dist.yml export-ignore
/phpunit.xml export-ignore
/phpmd.xml export-ignore
/phpstan.neon export-ignore
/phpcs.xml export-ignore
/bitbucket-pipelines.yml export-ignore
/tests export-ignore
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@
},
"archive": {
"exclude": [
"/CODE_OF_CONDUCT.md",
"/CONTRIBUTING.md",
"/.github",
"/.gitattributes",
"/.gitignore",
"/grumphp.dist.yml",
"/phpunit.xml",
"/phpmd.xml",
"/phpstan.neon",
Expand Down

0 comments on commit 31dc0b9

Please sign in to comment.