Skip to content

Commit

Permalink
chore: more robust way to get name of binary target
Browse files Browse the repository at this point in the history
Note this requires upgrading Bazel by one minor release to get native.package_relative_label
  • Loading branch information
alexeagle committed Mar 18, 2024
1 parent 1eac4fd commit bea2ddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0
6.1.0
2 changes: 1 addition & 1 deletion tools/container.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def multiarch_go_image(name, binary):
oci_image(
name = image_target,
base = "@distroless_static",
entrypoint = ["/app/{}".format(binary.removeprefix(":"))],
entrypoint = ["/app/{}".format(native.package_relative_label(binary).name)],
tars = [tar_target],
)

Expand Down

0 comments on commit bea2ddb

Please sign in to comment.