Sharing sourcecode attribute between models

I have a guild.yml that looks like this:

- include: guild/model1.yml
- include: guild/model2.yml
- include: guild/model3.yml

where guild/model1.yml and guild/model2.yml looks something like this:

- model: model1/model2
    - exclude:
          - data
          - build
          - libs
    - include:
          - scripts
          - module

As you notice, I have to specify the sourcecode attribute for each model, which gets a bit tedious. I am wondering if there is a better way to do this. Any suggestion?

Create another yml file that defines some config to inherit from and include that common file as needed in your model defs.

See GitHub - gar1t/guild-includes-example.

1 Like