mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Merge pull request #38990 from mikedanese/go-genrule-sets
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663) migrate set generation to go_genrule Depends on https://github.com/kubernetes/release/pull/238
This commit is contained in:
commit
503a8421fb
@ -257,6 +257,7 @@ pkg/util/netsh
|
|||||||
pkg/util/rand
|
pkg/util/rand
|
||||||
pkg/util/runtime
|
pkg/util/runtime
|
||||||
pkg/util/sets
|
pkg/util/sets
|
||||||
|
pkg/util/sets/types
|
||||||
pkg/util/tail
|
pkg/util/tail
|
||||||
pkg/util/validation
|
pkg/util/validation
|
||||||
pkg/util/validation/field
|
pkg/util/validation/field
|
||||||
|
@ -9,7 +9,7 @@ load(
|
|||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = ["types.go"],
|
srcs = ["doc.go"],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
21
pkg/util/sets/types/doc.go
Normal file
21
pkg/util/sets/types/doc.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
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,19 +2,13 @@ package(default_visibility = ["//visibility:public"])
|
|||||||
|
|
||||||
licenses(["notice"])
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load("@io_kubernetes_build//defs:go.bzl", "go_genrule")
|
||||||
load(
|
load(
|
||||||
"@io_bazel_rules_go//go:def.bzl",
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
"go_library",
|
"go_library",
|
||||||
"go_test",
|
"go_test",
|
||||||
)
|
)
|
||||||
|
|
||||||
go_test(
|
|
||||||
name = "go_default_test",
|
|
||||||
srcs = ["set_test.go"],
|
|
||||||
library = ":go_default_library",
|
|
||||||
tags = ["automanaged"],
|
|
||||||
)
|
|
||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
@ -27,3 +21,38 @@ go_library(
|
|||||||
],
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
go_genrule(
|
||||||
|
name = "set-gen",
|
||||||
|
srcs = [
|
||||||
|
"//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 ./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"],
|
||||||
|
)
|
||||||
|
14
staging/src/k8s.io/apimachinery/pkg/util/sets/types/BUILD
Normal file
14
staging/src/k8s.io/apimachinery/pkg/util/sets/types/BUILD
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
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"],
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user