Commit ff4a814c authored by Mike Danese's avatar Mike Danese

migrate set generation to go genrule

and move ./types to staging
parent 91475306
......@@ -254,6 +254,7 @@ pkg/util/netsh
pkg/util/rand
pkg/util/runtime
pkg/util/sets
pkg/util/sets/types
pkg/util/tail
pkg/util/validation
pkg/util/validation/field
......
......@@ -9,7 +9,7 @@ load(
go_library(
name = "go_default_library",
srcs = ["types.go"],
srcs = ["doc.go"],
tags = ["automanaged"],
)
......
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package sets only exists until heapster rebases
// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies
// on this package. This will allow us to start splitting packages, but will force
// heapster to update on their next kube rebase.
package sets
......@@ -2,22 +2,32 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load("@io_kubernetes_build//defs:go.bzl", "go_genrule")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_test(
name = "go_default_test",
srcs = ["set_test.go"],
library = ":go_default_library",
go_library(
name = "go_default_library",
srcs = [
"byte.go",
"doc.go",
"empty.go",
"int.go",
"int64.go",
"string.go",
],
tags = ["automanaged"],
)
go_library(
name = "go_default_library",
go_genrule(
name = "set-gen",
srcs = [
"//hack/boilerplate:boilerplate.go.txt",
],
outs = [
"byte.go",
"doc.go",
"empty.go",
......@@ -25,5 +35,24 @@ go_library(
"int64.go",
"string.go",
],
cmd = """
$(location //cmd/libs/go2idl/set-gen) \
--input-dirs ./vendor/k8s.io/apimachinery/pkg/util/sets/types \
--output-base $(GENDIR)/vendor/k8s.io/apimachinery/pkg/util \
--go-header-file $(location //hack/boilerplate:boilerplate.go.txt) \
--output-package sets
""",
go_deps = [
"//vendor/k8s.io/apimachinery/pkg/util/sets/types:go_default_library",
],
tools = [
"//cmd/libs/go2idl/set-gen",
],
)
go_test(
name = "go_default_test",
srcs = ["set_test.go"],
library = ":go_default_library",
tags = ["automanaged"],
)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = ["types.go"],
tags = ["automanaged"],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment