hack/update-vendor.sh

This commit is contained in:
Jordan Liggitt
2019-11-05 14:11:10 -05:00
parent 9a5b7c24ad
commit 297570e06a
932 changed files with 77190 additions and 28219 deletions

View File

@@ -9,8 +9,8 @@ go_library(
"kazel.go",
"sourcerer.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/repo-infra/kazel",
importpath = "k8s.io/repo-infra/kazel",
importmap = "k8s.io/kubernetes/vendor/k8s.io/repo-infra/cmd/kazel",
importpath = "k8s.io/repo-infra/cmd/kazel",
visibility = ["//visibility:private"],
deps = [
"//vendor/github.com/bazelbuild/buildtools/build:go_default_library",

View File

@@ -351,6 +351,19 @@ func writeFile(path string, f *build.File, boilerplate []byte, exists, dryRun bo
build.Rewrite(f, &info)
var out []byte
out = append(out, boilerplate...)
// double format the source file as our modification logic sometimes uses
// LiteralExpr where it should use other types of expressions, and this
// prevents issues where kazel thus formats structures incorrectly.
// :this_is_fine:
outData := build.Format(f)
var err error
f, err = build.Parse(path, outData)
if err != nil {
return false, fmt.Errorf("internal error occurred formatting file: %v", err)
}
// also call Rewrite again to run Buildifier against the results as
// visibility rules are not ordered correctly for some reason
build.Rewrite(f, &info)
out = append(out, build.Format(f)...)
if exists {
orig, err := ioutil.ReadFile(path)

4
vendor/k8s.io/utils/nsenter/BUILD generated vendored
View File

@@ -11,6 +11,7 @@ go_library(
visibility = ["//visibility:public"],
deps = select({
"@io_bazel_rules_go//go/platform:android": [
"//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/utils/exec:go_default_library",
],
"@io_bazel_rules_go//go/platform:darwin": [
@@ -22,6 +23,9 @@ go_library(
"@io_bazel_rules_go//go/platform:freebsd": [
"//vendor/k8s.io/utils/exec:go_default_library",
],
"@io_bazel_rules_go//go/platform:ios": [
"//vendor/k8s.io/utils/exec:go_default_library",
],
"@io_bazel_rules_go//go/platform:linux": [
"//vendor/k8s.io/klog:go_default_library",
"//vendor/k8s.io/utils/exec:go_default_library",