Skip to content

Commit

Permalink
Introduce output_group for pusher executable (#1685)
Browse files Browse the repository at this point in the history
This allows the pusher to be referenced as a label without including all the default outputs including the .digest file

Fixes #1684

Also use the user-provided value for the (undocumented) "extension" parameter if one is set.

Fixes #1683
  • Loading branch information
alexeagle authored Dec 22, 2020
1 parent 6c29619 commit 7da0de3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions container/push.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def _impl(ctx):
executable = exe,
runfiles = runfiles,
),
OutputGroupInfo(
exe = [exe],
),
PushInfo(
registry = registry,
repository = repository,
Expand Down Expand Up @@ -224,10 +227,10 @@ def container_push(name, format, image, registry, repository, **kwargs):
image = image,
registry = registry,
repository = repository,
extension = select({
extension = kwargs.pop("extension", select({
"@bazel_tools//src/conditions:host_windows": ".bat",
"//conditions:default": "",
}),
})),
tag_tpl = select({
"@bazel_tools//src/conditions:host_windows": Label("//container:push-tag.bat.tpl"),
"//conditions:default": Label("//container:push-tag.sh.tpl"),
Expand Down

0 comments on commit 7da0de3

Please sign in to comment.