...
1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
2
3go_library(
4 name = "fetch_repo_lib",
5 srcs = [
6 "fetch_repo.go",
7 "module.go",
8 "vcs.go",
9 ],
10 importpath = "github.com/bazelbuild/bazel-gazelle/cmd/fetch_repo",
11 visibility = ["//visibility:private"],
12 deps = [
13 "@org_golang_x_mod//sumdb/dirhash",
14 "@org_golang_x_tools_go_vcs//:vcs",
15 ],
16)
17
18go_binary(
19 name = "fetch_repo",
20 embed = [":fetch_repo_lib"],
21 visibility = ["//visibility:public"],
22)
23
24go_test(
25 name = "fetch_repo_test",
26 srcs = ["fetch_repo_test.go"],
27 embed = [":fetch_repo_lib"],
28 deps = ["@org_golang_x_tools_go_vcs//:vcs"],
29)
30
31filegroup(
32 name = "all_files",
33 testonly = True,
34 srcs = [
35 "BUILD.bazel",
36 "fetch_repo.go",
37 "fetch_repo_test.go",
38 "module.go",
39 "vcs.go",
40 ],
41 visibility = ["//visibility:public"],
42)
View as plain text