-
Notifications
You must be signed in to change notification settings - Fork 5
/
BUILD
42 lines (39 loc) · 1.16 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:proto disable_global
# gazelle:exclude tools/deb-tools/
gazelle(
name = "gazelle",
external = "vendored",
prefix = "sigs.k8s.io/etcd-manager",
)
load("//images:etcd.bzl", "supported_etcd_arch_and_version")
[
genrule(
name = "etcd-v{version}-linux-{arch}_{bin}".format(
arch = arch,
bin = bin,
version = version,
),
srcs = ["@etcd_{version}_{arch}_tar//file".format(
arch = arch,
bin = bin,
version = version,
)],
outs = ["etcd-v{version}-linux-{arch}/{bin}".format(
arch = arch,
bin = bin,
version = version,
)],
cmd = "tar -x -z --no-same-owner -f ./$(location @etcd_{version}_{arch}_tar//file) etcd-v{version}-linux-{arch}/{bin} && mv etcd-v{version}-linux-{arch}/{bin} \"$@\"".format(
arch = arch,
bin = bin,
version = version,
),
visibility = ["//visibility:public"],
)
for (arch, version) in supported_etcd_arch_and_version()
for bin in [
"etcd",
"etcdctl",
]
]