Add go_genrule for zz_generated.openapi.go.

Clean zz_generated.openapi.go before running gazel.
This commit is contained in:
Joe Finney
2017-02-07 15:56:46 -08:00
parent 3bc3e410b8
commit 8e84a9aedc
5 changed files with 83 additions and 17 deletions

View File

@@ -20,7 +20,11 @@ set -o pipefail
export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
go get gopkg.in/mikedanese/gazel.v16/gazel
# Remove generated files prior to running gazel.
# TODO(spxtr): Remove this line once Bazel is the only way to build.
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
go get -u gopkg.in/mikedanese/gazel.v16/gazel
for path in ${GOPATH//:/ }; do
if [[ -e "${path}/bin/gazel" ]]; then