forked from cloudspannerecosystem/wrench
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
54 lines (47 loc) · 1.53 KB
/
BUILD.bazel
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
43
44
45
46
47
48
49
50
51
52
53
54
version = "1.0.0"
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "nogo")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
# gazelle:prefix github.com/mercari/wrench
gazelle(name = "gazelle")
nogo(
name = "nogo",
visibility = ["//visibility:public"],
deps = [
"@org_golang_x_tools//go/analysis/passes/atomic:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/bools:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/buildtag:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/nilfunc:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/printf:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/structtag:go_tool_library",
],
)
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/mercari/wrench",
visibility = ["//visibility:private"],
x_defs = {"github.com/mercari/wrench/cmd.Version": version},
deps = [
"//cmd:go_default_library",
"//pkg/spanner:go_default_library",
],
)
go_binary(
name = "wrench",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)
go_image(
name = "image",
embed = [":go_default_library"],
)
container_push(
name = "registry",
format = "Docker",
image = ":image",
registry = "index.docker.io",
repository = "mercari/wrench",
tag = version,
)