Skip to content

post_build

post_build

Type: object or list of object

Properties for post-build steps to be performed for this project. The project may reference an SDK template profile (A), or an existing, specific post-build file (B). When generating a project referencing an SDK template profile, the .slcp file shall be rewritten to point to the path of the resolved post-build file.

Key Required Type Description
profile A String The ID of the post-build profile to use from the SDK as a template for this project. If the requested profile doesn't exist in the SDK, an error is raised.
path B String Path to post-build file.
condition No List of features The post-build file or profile is added if all the given features are present
unless No List of features The post-build file or profile is added unless any of the given features are present
vendor No String The vendor of the SDK extension the component is from. Only the vendors listed under extension/vendor or sdk/vendor key may be used.
package No String The ID of the SDK extension the component is from. Only SDK extensions listed using the extension/id or sdk/id key may be used.

The profile, package, and vendor fields together form a post-build reference. For details on post-build references and how the package and vendor fields affect resolution, see the component reference documentation, which explains the reference mechanism.

Tools must associate no more than one post-build file or profile with a project after all conditions are resolved. If multiple conditions are true, the tool must choose the first matching post-build file or profile. A warning may be issued, but it is not required. To avoid ambiguity and ensure consistent resolution, post-build profiles defined in .slce and .slcs files are considered namespaced by their extension’s vendor and package. When referencing a post-build profile from .slcp or .slcw files, specifying the vendor, package, and profile name is recommended. In cases where multiple extensions define profiles with the same profile_name and the reference omits the vendor or package, the tool must produce a validation error.

Example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
post_build:
  # Fully implicit reference; Search across all SDKs and extensions available to the project
    - profile: trustzone-secure
  # Vendor-specific reference; Limit search to vendor's specific SDK/extension.
    - profile: trustzone-secure-alt
      vendor: acme
  # Package-specific reference; Limit search to package ID by any vendor
    - profile: trustzone-advanced
      package: advanced_security
  # Fully qualified reference; Limit search to pacific sdk/extension by vendor farmer
    - profile: trustzone-pacific
      package: pacific_sdk
      vendor: farmer
1
2
3
4
5
post_build:
  - profile: trustzone-secure
    condition: [foo]
  - profile: trustzone-secure-alt
    unless: [foo]
1
2
post_build:
  path: my_project.slpb
1
2
3
4
5
post_build:
  - path: my_project_a.slpb
    condition: [foo]
  - path: my_project_b.slpb
    condition: [bar]