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