tailor
tailor copied to clipboard
[FEATURE] Have ExcludeFromPackaging respect .gitattributes file
Summary / Description
Talking with @georgringer this morning as he asked about if my GitHub Action respects the .gitattributes
-file. I look into the Tailor and say it's a manually maintain list (1) of files that would be included.
I find that perfectly OK, but would suggest having the .gitattributes
respected as well.
Describe alternatives you've considered
Haven't considered other alternative yet.
Possible solution
My suggestion would be to parse the .gitattributes
file and added to the array of /conf/ExcludeFromPackaging.php
Links
[1] https://github.com/TYPO3/tailor/blob/main/conf/ExcludeFromPackaging.php
thought of that feature as well, would be great to have this!
Will see if I can have it done. What do you think of my approach? Doing it like that would be quite simple to do.
Yes. I always just thought "How can we parse the .gitattributes to be fully compliant like git" something like "**/vendor/*php" is probably possible. And I guess we need to consider only the "export-ignore" rows. https://git-scm.com/docs/gitattributes
I am actually in favor of "if there is a gitattributes file, we just use that one and nothing else"
Yes. I always just thought "How can we parse the .gitattributes to be fully compliant like git" something like "**/vendor/*php" is probably possible. And I guess we need to consider only the "export-ignore" rows. https://git-scm.com/docs/gitattributes
Will look into that.
I am actually in favor of "if there is a gitattributes file, we just use that one and nothing else"
I like that approach.
With Github I'm solving this by using the artefact from the release which already respects the .gitattributes.
The simplest solution would be just using git archive
to create an artefact for the upload but requires git to be installed which most probably should be the case.
With Github I'm solving this by using the artefact from the release which already respects the .gitattributes.
The simplest solution would be just using
git archive
to create an artefact for the upload but requires git to be installed which most probably should be the case.
Please be aware of not tracked files in a git repo for extensions, which require some dynamic files for TER version.
For example EXT:solr has a build step to install and provide solarium/solarium
for TER version.
Therefore it must be possible to use the git archive --add-file option on packaging with tailor.
See:
- https://github.com/TYPO3-Solr/ext-solr/blob/f49dbf32434542071f963209a4e6556d0afc7a1d/Resources/Private/Php/ComposerLibraries/composer.json
- https://github.com/TYPO3-Solr/ext-solr/blob/f49dbf32434542071f963209a4e6556d0afc7a1d/composer.json#L90-L92