Skip to content

Conversation

@styxit
Copy link
Member

@styxit styxit commented Mar 31, 2025

Description

Add a .gitattributes file that defines which files to exclude in when running git archive.

When composer-installing this package now only the following files are downloaded:

  • src/
  • composer.json
  • LICENSE.md
  • README.md

More info on export-ignore via gitattributes: https://git-scm.com/docs/gitattributes#_export_ignore

Motivation and context

This reduces the size of the package when installing via composer. Files that are not needed to run the package in another project are no longer included. For example the tests.

How has this been tested?

Run git archive -o latest.zip HEAD and see the zip archive no longer contains things like tests.

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • My pull request contains a title that can be used as a release note.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

@styxit styxit added the ci Work that improves the continue integration. label Mar 31, 2025
@robbinjanssen robbinjanssen merged commit 4bbbc48 into master Apr 1, 2025
6 of 7 checks passed
@robbinjanssen robbinjanssen deleted the gitattributes branch April 1, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Work that improves the continue integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants