tt icon indicating copy to clipboard operation
tt copied to clipboard

Allow to ignore paths on artifact pack

Open DifferentialOrange opened this issue 1 year ago • 2 comments

There are some cases when I have files that may be useful, but shouldn't be a part of artifact. Now I can "filter" then through tt.post-build, but it is inconvenient to use use it together with tt build.

For example, I have some local rock that my application needs to use. I store it in the custom_rocks folder and install with tt.pre-build script. I don't need custom_rocks/myrock-scm-1.all.rock file to be a part of the artifact since application use one that's already unpacked to its .rocks/share/.... I can remove it from the artifact with tt.post-build, but then the rock will be removed in case I run tt build as well --- and I don't want it to be gone. Similar things will happen even if I don't use a path to build an artifact (for example, doc folder).

So it would be nice to provide some file to specify the list of files to be ignored on the packing stage. (Maybe we can reuse .gitignore, I haven't thought about it that much.) We also need to consider the case when the file is required on tt.pre-build or tt-post-build stage, but shouldn't be a part of the artifact, as I had described above.

DifferentialOrange avatar Apr 02 '24 13:04 DifferentialOrange

This functionality shoudl be supported additionally to .gitignore for the scenarios if the application is not a git repo. My suggestion is to support .packignore file with list of files/dirs that should not be copied to the result packages during packaging.

psergee avatar Jun 25 '24 07:06 psergee

I would like to work on this issue. Could you please assign it to me? @psergee

Japsty avatar Oct 08 '24 11:10 Japsty