-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
55 lines (48 loc) · 1.14 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
55
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle : exclude build
# gazelle:prefix github.com/kruemelmann/sweep/
gazelle(name = "gazelle")
gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)
go_library(
name = "lib",
srcs = ["main.go"],
importpath = "github.com/kruemelmann/sweep/",
visibility = ["//visibility:private"],
deps = ["//cmd"],
)
go_binary(
name = "sweep",
embed = [":lib"],
visibility = ["//visibility:public"],
)
## cross compile for the docker container
go_binary(
name = "cross_linuxamd64",
embed = [":lib"],
goarch = "amd64",
goos = "linux",
visibility = ["//visibility:public"],
)
go_binary(
name = "cross_darwinamd64",
embed = [":lib"],
goarch = "amd64",
goos = "darwin",
visibility = ["//visibility:public"],
)
go_binary(
name = "cross_darwinarm64",
embed = [":lib"],
goarch = "arm64",
goos = "darwin",
visibility = ["//visibility:public"],
)