-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
41 lines (34 loc) · 1.02 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
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
gazelle_binary(
name = "gazelle-buf",
languages = [
# Loads the native proto extension
"@bazel_gazelle//language/proto:go_default_library",
# Loads the Buf extension. NOTE: This needs to be loaded after the proto language
"@rules_buf//gazelle/buf:buf",
],
)
gazelle(
name = "gazelle-update-repos",
args = [
# This can also be `buf.yaml` and `buf.lock`.
"--from_file=buf.work.yaml",
# This is optional but recommended, if absent gazelle
# will add the rules directly to WORKSPACE
"-to_macro=buf_deps.bzl%buf_deps",
# Deletes outdated repo rules
"-prune",
],
command = "update-repos",
gazelle = ":gazelle-buf",
# gazelle:prefix github.com/example/project
# gazelle(
# name = "gazelle",
# gazelle = ":gazelle-buf",
# )
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
go_binary(
name = "hello",
srcs = ["hello.go"],
)
exports_files(["buf.yaml"])