-
Notifications
You must be signed in to change notification settings - Fork 25
/
BUILD
35 lines (31 loc) · 1.11 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
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
# Run `bazel run //:gazelle` each time you add a new directory.
# As a result, `BUILD` files will be generated for you within that directory.
# gazelle:prefix github.com/slsa-framework/example-package
gazelle(name = "gazelle")
# Run `bazel run //:gazelle-update-repos` each time `go.mod` changes (e.g., you
# add a new dependency). This would result in Bazel workspace dependencies also
# being brought up to date.
gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)
# Existing rules (you can write your own or use the ones generated by `gazelle`).
go_binary(
name = "hello",
embed = [":example-package_lib"],
visibility = ["//visibility:public"],
)
go_library(
name = "example-package_lib",
srcs = ["main.go"],
importpath = "github.com/slsa-framework/example-package",
visibility = ["//visibility:private"],
deps = ["@com_github_pborman_uuid//:uuid"],
)