Skip to content

Commit

Permalink
rename verify/ to hack/ for consistency with k/k
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Nov 2, 2017
1 parent c258100 commit 597ae39
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ filegroup(
"//gcsweb/cmd/gcsweb:all-srcs",
"//gcsweb/pkg/version:all-srcs",
"//ghclient:all-srcs",
"//hack:all-srcs",
"//images/bazelbuild:all-srcs",
"//jenkins:all-srcs",
"//jobs:all-srcs",
Expand All @@ -50,7 +51,6 @@ filegroup(
"//triage:all-srcs",
"//velodrome:all-srcs",
"//vendor:all-srcs",
"//verify:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The [test-infra oncall] must push prow changes (`make -C prow update-config`).

We use [Bazel](https://www.bazel.io/) to build and test the code in this repo.
The commands `bazel build //...` and `bazel test //...` should be all you need
for most cases. If you modify Go code, run `./verify/update-bazel.sh` to keep
for most cases. If you modify Go code, run `./hack/update-bazel.sh` to keep
`BUILD` files up-to-date.

## Federated Testing
Expand Down
2 changes: 1 addition & 1 deletion docs/dep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can use the `dep` instructions for [adding](https://github.com/golang/dep#ad
Once you've updated, make sure to run:
```
dep prune
verify/update-bazel.sh
hack/update-bazel.sh
```

To prune unneeded deps, and then update all the bazel files that `dep` blows away.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions hack/update-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# 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.

set -o errexit
set -o nounset
set -o pipefail

TESTINFRA_ROOT=$(git rev-parse --show-toplevel)
${TESTINFRA_ROOT}/hack/update-bazel.sh
${TESTINFRA_ROOT}/hack/update-gofmt.sh
4 changes: 2 additions & 2 deletions verify/update-bazel.sh → hack/update-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ set -o pipefail
TESTINFRA_ROOT=$(git rev-parse --show-toplevel)
TMP_GOPATH=$(mktemp -d)

"${TESTINFRA_ROOT}/verify/go_install_from_commit.sh" \
"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
github.com/kubernetes/repo-infra/kazel \
e26fc85d14a1d3dc25569831acc06919673c545a \
"${TMP_GOPATH}"

# The gazelle commit should match the rules_go commit in the WORKSPACE file.
"${TESTINFRA_ROOT}/verify/go_install_from_commit.sh" \
"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle \
c72631a220406c4fae276861ee286aaec82c5af2 \
"${TMP_GOPATH}"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions verify/verify-bazel.sh → hack/verify-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ set -o pipefail
TESTINFRA_ROOT=$(git rev-parse --show-toplevel)
TMP_GOPATH=$(mktemp -d)

"${TESTINFRA_ROOT}/verify/go_install_from_commit.sh" \
"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
github.com/kubernetes/repo-infra/kazel \
e26fc85d14a1d3dc25569831acc06919673c545a \
"${TMP_GOPATH}"

# The gazelle commit should match the rules_go commit in the WORKSPACE file.
"${TESTINFRA_ROOT}/verify/go_install_from_commit.sh" \
"${TESTINFRA_ROOT}/hack/go_install_from_commit.sh" \
github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle \
c72631a220406c4fae276861ee286aaec82c5af2 \
"${TMP_GOPATH}"
Expand All @@ -49,6 +49,6 @@ if [[ -n "${gazelle_diff}" || -n "${kazel_diff}" ]]; then
echo "${gazelle_diff}"
echo "${kazel_diff}"
echo
echo "Run ./verify/update-bazel.sh"
echo "Run ./hack/update-bazel.sh"
exit 1
fi
2 changes: 1 addition & 1 deletion verify/verify-gofmt.sh → hack/verify-gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ diff=$(find . -name "*.go" | grep -v "\/vendor\/" | xargs gofmt -s -d 2>&1)
if [[ -n "${diff}" ]]; then
echo "${diff}"
echo
echo "Please run verify/update-gofmt.sh"
echo "Please run hack/update-gofmt.sh"
exit 1
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_args():
rootdir = os.path.abspath(rootdir)
parser.add_argument("--rootdir", default=rootdir, help="root directory to examine")

default_boilerplate_dir = os.path.join(rootdir, "verify/boilerplate")
default_boilerplate_dir = os.path.join(rootdir, "hack/boilerplate")
parser.add_argument("--boilerplate-dir", default=default_boilerplate_dir)
return parser.parse_args()

Expand Down
6 changes: 3 additions & 3 deletions jobs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9565,7 +9565,7 @@
},
"pull-test-infra-verify-bazel": {
"args": [
"./verify/verify-bazel.sh"
"./hack/verify-bazel.sh"
],
"scenario": "execute",
"sigOwners": [
Expand All @@ -9574,7 +9574,7 @@
},
"pull-test-infra-verify-gofmt": {
"args": [
"./verify/verify-gofmt.sh"
"./hack/verify-gofmt.sh"
],
"scenario": "execute",
"sigOwners": [
Expand All @@ -9583,7 +9583,7 @@
},
"pull-test-infra-verify-govet": {
"args": [
"./verify/verify-govet.sh"
"./hack/verify-govet.sh"
],
"scenario": "execute",
"sigOwners": [
Expand Down

0 comments on commit 597ae39

Please sign in to comment.