packager icon indicating copy to clipboard operation
packager copied to clipboard

[Feature Request] Excluding folders based on release type or replacements on .pkgmeta files

Open emmericp opened this issue 1 year ago • 3 comments

I'm in the process of adding some large-ish test data over multiple files to an AddOn that I would like to only include in alpha builds.

I'm currently just putting #@alpha@ tags into the toc file to prevent the files from being loaded, but I would like to exclude them fully just to keep the package a bit smaller.

Maybe it would be a good idea to have some replacements on the .pkgmeta file that gets applied prior to the .pkgmeta being evaluated? For example:

ignore:
  - Foo/Bar
#@alpha@
  - Foo/Testdata/
#@end-alpha@

Which would comment it out in non-alpha builds. Could probably be the same code as toc replacements because both use # for comments.

emmericp avatar May 05 '24 12:05 emmericp

Personally I've no horse in this race, but an alternative solution that'll work for you today is to use the -m pkgmeta.yaml flag to specify a different .pkgmeta with a different set of ignores for your alpha builds.

Only downside is I believe there's no generic include: other-pkgmeta.yaml functionality, so you'll need to effectively duplicate the contents in full into this secondary file.

Meorawr avatar May 05 '24 12:05 Meorawr

Yea, @Meorawr beat me to it but I would just recommend creating a new pkgmeta that is used for alpha builds as that is already the recommended practice for dealing with builds of different versions.

nebularg avatar May 06 '24 02:05 nebularg

Only downside is I believe there's no generic include: other-pkgmeta.yaml functionality

Also, I need to basically re-invent the check for which version is being built

emmericp avatar May 11 '24 15:05 emmericp