Skip to content

Commit 1736170

Browse files
committed
Use correct platform for rules_docker pusher
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 443b966 commit 1736170

3 files changed

Lines changed: 30 additions & 5 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/container/push.bzl b/container/push.bzl
2+
index baef9c2..942741d 100644
3+
--- a/container/push.bzl
4+
+++ b/container/push.bzl
5+
@@ -205,7 +205,7 @@ container_push_ = rule(
6+
),
7+
"_pusher": attr.label(
8+
default = "//container/go/cmd/pusher",
9+
- cfg = "target",
10+
+ cfg = "host",
11+
executable = True,
12+
allow_files = True,
13+
),
14+
diff --git a/contrib/push-all.bzl b/contrib/push-all.bzl
15+
index c7e7f72..fd6518b 100644
16+
--- a/contrib/push-all.bzl
17+
+++ b/contrib/push-all.bzl
18+
@@ -126,7 +126,7 @@ container_push = rule(
19+
),
20+
"_pusher": attr.label(
21+
default = Label("//container/go/cmd/pusher"),
22+
- cfg = "target",
23+
+ cfg = "host",
24+
executable = True,
25+
allow_files = True,
26+
),

bazel/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def _pl_deps():
253253
_bazel_repo("rules_foreign_cc")
254254
_bazel_repo("io_bazel_rules_k8s")
255255
_bazel_repo("io_bazel_rules_closure")
256-
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch"], patch_args = ["-p1"])
256+
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch", "//bazel/external:rules_docker_pusher_cfg.patch"], patch_args = ["-p1"])
257257
_bazel_repo("rules_python")
258258
_bazel_repo("rules_pkg")
259259
_bazel_repo("com_github_bazelbuild_buildtools")

bazel/ui.bzl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ def _pl_webpack_library_impl(ctx):
6969
if ctx.attr.stamp:
7070
# This is some truly shady stuff. The stamping on genrules just makes this file
7171
# available, but does not apply it to the environment. We parse out the file
72-
# and apply it to the environment here. Hopefully,
73-
# no special characters/spaces/quotes in the results ...
72+
# and apply it to the environment here. Values are quoted to handle spaces.
7473
env_cmds = [
75-
'$(sed -E "s/^([A-Za-z_]+)\\s*(.*)/export \\1=\\2/g" "{}")'.format(ctx.info_file.path),
76-
'$(sed -E "s/^([A-Za-z_]+)\\s*(.*)/export \\1=\\2/g" "{}")'.format(ctx.version_file.path),
74+
'$(sed -E "s/^([A-Za-z_]+)\\s*(.*)/export \\1=\\"\\2\\"/g" "{}")'.format(ctx.info_file.path),
75+
'$(sed -E "s/^([A-Za-z_]+)\\s*(.*)/export \\1=\\"\\2\\"/g" "{}")'.format(ctx.version_file.path),
7776
]
7877
all_files.append(ctx.info_file)
7978
all_files.append(ctx.version_file)

0 commit comments

Comments
 (0)