Skip to content

Commit

Permalink
fix: propagate testonly flag on js_run_binary targets (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard authored Jan 6, 2023
1 parent df0c1c3 commit faff82d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/private/js_run_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def js_run_binary(
include_npm_linked_packages = include_npm_linked_packages,
# Always tag the target manual since we should only build it when the final target is built.
tags = kwargs.get("tags", []) + ["manual"],
# Always propagate the testonly attribute
testonly = kwargs.get("testonly", False),
)
extra_srcs.append(":{}".format(js_filegroup_name))

Expand All @@ -236,6 +238,8 @@ def js_run_binary(
srcs = srcs,
# Always tag the target manual since we should only build it when the final target is built.
tags = kwargs.get("tags", []) + ["manual"],
# Always propagate the testonly attribute
testonly = kwargs.get("testonly", False),
)
extra_srcs.append(":{}".format(copy_to_bin_name))

Expand Down Expand Up @@ -309,6 +313,8 @@ See https://github.com/aspect-build/rules_js/tree/main/docs#using-binaries-publi
srcs = [tool],
# Always tag the target manual since we should only build it when the final target is built.
tags = kwargs.get("tags", []) + ["manual"],
# Always propagate the testonly attribute
testonly = kwargs.get("testonly", False),
)
js_runfiles_name = "{}_runfiles".format(name)
native.filegroup(
Expand All @@ -317,6 +323,8 @@ See https://github.com/aspect-build/rules_js/tree/main/docs#using-binaries-publi
srcs = [":{}".format(js_runfiles_lib_name)],
# Always tag the target manual since we should only build it when the final target is built.
tags = kwargs.get("tags", []) + ["manual"],
# Always propagate the testonly attribute
testonly = kwargs.get("testonly", False),
)
extra_srcs.append(":{}".format(js_runfiles_name))

Expand Down

0 comments on commit faff82d

Please sign in to comment.