tailor icon indicating copy to clipboard operation
tailor copied to clipboard

[FEATURE] Have ExcludeFromPackaging respect .gitattributes file

Open tomasnorre opened this issue 4 years ago • 7 comments

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

tomasnorre avatar Jan 21 '21 07:01 tomasnorre

thought of that feature as well, would be great to have this!

bmack avatar Jan 21 '21 07:01 bmack

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.

tomasnorre avatar Jan 21 '21 07:01 tomasnorre

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

bmack avatar Jan 21 '21 07:01 bmack

I am actually in favor of "if there is a gitattributes file, we just use that one and nothing else"

bmack avatar Jan 21 '21 07:01 bmack

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.

tomasnorre avatar Jan 21 '21 07:01 tomasnorre

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.

gilbertsoft avatar Sep 27 '21 19:09 gilbertsoft

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

dkd-kaehm avatar Oct 26 '23 19:10 dkd-kaehm