6c9628cdb1
* Rename 'vendor/src' -> 'vendor' * Ignore vendor/ instead of vendor/src/ for lint * Rename 'cmd/client' -> 'cmd/ocic' to make it 'go install'able * Rename 'cmd/server' -> 'cmd/ocid' to make it 'go install'able * Update Makefile to build and install from GOPATH * Update tests to locate ocid/ocic in GOPATH/bin * Search for binaries in GOPATH/bin instead of PATH * Install tools using `go get -u`, so they are updated on each run Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
65 lines
1.2 KiB
Text
65 lines
1.2 KiB
Text
package(default_visibility = ["//visibility:public"])
|
|
|
|
licenses(["notice"])
|
|
|
|
load(
|
|
"@io_bazel_rules_go//go:def.bzl",
|
|
"go_library",
|
|
"go_test",
|
|
)
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs = [
|
|
":set-gen",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "go_default_test",
|
|
srcs = ["set_test.go"],
|
|
library = ":go_default_library",
|
|
tags = ["automanaged"],
|
|
)
|
|
|
|
genrule(
|
|
name = "set-gen",
|
|
srcs = [
|
|
"//pkg/util/sets/types:types.go",
|
|
"//hack/boilerplate:boilerplate.go.txt",
|
|
],
|
|
outs = [
|
|
"byte.go",
|
|
"doc.go",
|
|
"empty.go",
|
|
"int.go",
|
|
"int64.go",
|
|
"string.go",
|
|
],
|
|
cmd = """
|
|
$(location //cmd/libs/go2idl/set-gen) \
|
|
--input-dirs ./pkg/util/sets/types \
|
|
--output-base $(GENDIR)/pkg/util \
|
|
--go-header-file $(location //hack/boilerplate:boilerplate.go.txt) \
|
|
--output-package sets
|
|
""",
|
|
tools = [
|
|
"//cmd/libs/go2idl/set-gen",
|
|
],
|
|
)
|
|
|
|
filegroup(
|
|
name = "package-srcs",
|
|
srcs = glob(["**"]),
|
|
tags = ["automanaged"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "all-srcs",
|
|
srcs = [
|
|
":package-srcs",
|
|
"//pkg/util/sets/types:all-srcs",
|
|
],
|
|
tags = ["automanaged"],
|
|
)
|