Skip to content

Commit

Permalink
Use repo-infra to verify boilerplates
Browse files Browse the repository at this point in the history
  • Loading branch information
fejta committed Oct 3, 2019
1 parent d59b822 commit 317982a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 350 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "io_k8s_repo_infra",
commit = "c1e213ec44705ed55b81fdb037a05081171d432b",
commit = "db6ceb5f992254db76af7c25db2edc5469b5ea82",
remote = "https://github.com/kubernetes/repo-infra.git",
shallow_since = "1570124037 -0700",
shallow_since = "1570128715 -0700",
)

load("@io_k8s_repo_infra//:load.bzl", "repositories")
Expand Down
21 changes: 7 additions & 14 deletions hack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ py_test(
python_version = "PY3",
)

py_test(
name = "verify_boilerplate",
srcs = ["verify_boilerplate.py"],
data = ["//:all-srcs"],
python_version = "PY3",
tags = ["lint"],
)

sh_test(
name = "verify-pylint",
srcs = ["verify-pylint.sh"],
Expand Down Expand Up @@ -73,7 +65,7 @@ sh_test(
"$(location @io_k8s_code_generator//cmd/lister-gen)",
],
data = [
":boilerplate/boilerplate.generated.go.txt",
":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
":update-codegen",
"//:go.mod",
"//:go.sum",
Expand All @@ -97,7 +89,7 @@ sh_binary(
"$(location @io_k8s_code_generator//cmd/lister-gen)",
],
data = [
":boilerplate/boilerplate.generated.go.txt",
":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
"//:go.mod",
"//:go.sum",
"@go_sdk//:files",
Expand Down Expand Up @@ -157,12 +149,12 @@ sh_binary(
args = [
"$(location %s)" % protoc,
"$(location %s)" % protoc_gen_go,
"$(location %s)" % ":boilerplate/boilerplate.generated.go.txt",
"$(location %s)" % ":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
protoc_grpc,
proto_importmap,
],
data = [
":boilerplate/boilerplate.generated.go.txt",
":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
"//:all-srcs",
protoc,
protoc_gen_go,
Expand All @@ -177,12 +169,12 @@ sh_test(
"$(location %s)" % ":update-protos",
"$(location %s)" % protoc,
"$(location %s)" % protoc_gen_go,
"$(location %s)" % ":boilerplate/boilerplate.generated.go.txt",
"$(location %s)" % ":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
protoc_grpc,
proto_importmap,
],
data = [
":boilerplate/boilerplate.generated.go.txt",
":boilerplate/boilerplate.generated.go.txt", # TODO(fejta): use repo-infra version
":update-protos",
protoc,
protoc_gen_go,
Expand Down Expand Up @@ -220,6 +212,7 @@ test_suite(
":verify-linters",
# "@io_k8s_repo_infra//hack:verify-all", # TODO(fejta): golangci-lint
"@io_k8s_repo_infra//hack:verify-bazel",
"@io_k8s_repo_infra//hack:verify-boilerplate",
"@io_k8s_repo_infra//hack:verify-deps",
"@io_k8s_repo_infra//hack:verify-gofmt",
],
Expand Down
14 changes: 0 additions & 14 deletions hack/boilerplate/boilerplate.Dockerfile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions hack/boilerplate/boilerplate.Makefile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions hack/boilerplate/boilerplate.bzl.txt

This file was deleted.

16 changes: 0 additions & 16 deletions hack/boilerplate/boilerplate.go.txt

This file was deleted.

14 changes: 0 additions & 14 deletions hack/boilerplate/boilerplate.py.txt

This file was deleted.

14 changes: 0 additions & 14 deletions hack/boilerplate/boilerplate.sh.txt

This file was deleted.

Loading

0 comments on commit 317982a

Please sign in to comment.