• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Excluding files in add-on build

Robust

Well-known member
#1
I know you have an additional_files option, but is there a way to exclude files from the add-on build?

I have a git repository with some additional files (like README.md and whatnot) that I don't want to include in the final release. I can't find a key to remove them.
 

Chris D

XenForo developer
Staff member
#2
See the exec example here:

https://xf2demo.xenforo.com/dev-docs/development-tools/#customizing-the-build-process

You can pass a CLI command or a script to be executed in there. It will be applied to the temporary _build directory, before the ZIP is created.

I should add, the commands are run relative to your add-on root directory. In other words, if you want to be removing stuff from within the _build directory you'll want to be doing e.g. rm -rf _build/file/to/delete.