Multiple Compatibility
You can declare resources with different compatibilities for target systems.
Declaration
To declare multiple compatibilities, you simply add a new entry in the compatibility
array for each target system. For example, if you have a file that needs to be copied into packages for target systems os/linux
and os/windows
, and the compatible app differs between these two systems, you can declare it as follows:
- .aiop
- .aml
- file.txt
resources/.aml
- source: file.txt
destination: file.txt
compatibility:
- os/linux:
app: [applinux]
- os/windows:
app: [appwin]
This avoids having to declare the resource twice, once for each target system.
resources/.aml
- source: file.txt
destination: file.txt
compatibility:
- os/linux:
app: [applinux]
- source: file.txt
destination: file.txt
compatibility:
- os/windows:
app: [appwin]