2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-28 21:33:48 +00:00
bazel-lib/docs/transitions.md
Thomas Lam faaada2eaa
feat: add platform_transition_test (#770)
* Add platform_transition_test

Signed-off-by: Thomas Lam <thomaslam@canva.com>

* Set target platform constraints for tests

Signed-off-by: Thomas Lam <thomaslam@canva.com>

* Update docs

Signed-off-by: Thomas Lam <thomaslam@canva.com>

---------

Signed-off-by: Thomas Lam <thomaslam@canva.com>
2024-04-03 14:42:07 -07:00

3.6 KiB
Generated

Rules for working with transitions.

platform_transition_binary

platform_transition_binary(name, basename, binary, target_platform)

Transitions the binary to use the provided platform.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
basename - String optional ""
binary - Label optional None
target_platform The target platform to transition the binary. Label required

platform_transition_filegroup

platform_transition_filegroup(name, srcs, target_platform)

Transitions the srcs to use the provided platform. The filegroup will contain artifacts for the target platform.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
srcs The input to be transitioned to the target platform. List of labels optional []
target_platform The target platform to transition the srcs. Label required

platform_transition_test

platform_transition_test(name, basename, binary, target_platform)

Transitions the test to use the provided platform.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
basename - String optional ""
binary - Label optional None
target_platform The target platform to transition the binary. Label required