mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 10:18:13 +00:00 
			
		
		
		
	Switch from gazel to kazel, and move kazelcfg into build/root
This commit is contained in:
		
							
								
								
									
										1
									
								
								.kazelcfg.json
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								.kazelcfg.json
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| build/root/.kazelcfg.json | ||||
| @@ -20,21 +20,10 @@ set -o pipefail | ||||
| export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | ||||
|  | ||||
| # Remove generated files prior to running gazel. | ||||
| # Remove generated files prior to running kazel. | ||||
| # 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.v17/gazel | ||||
| kube::util::go_install_from_commit github.com/kubernetes/repo-infra/kazel fd3ec969104295f8484a32114ce625955a67365d | ||||
|  | ||||
| for path in ${GOPATH//:/ }; do | ||||
|   if [[ -e "${path}/bin/gazel" ]]; then | ||||
|     gazel="${path}/bin/gazel" | ||||
|     break | ||||
|   fi | ||||
| done | ||||
| if [[ -z "${gazel:-}" ]]; then | ||||
|   echo "Couldn't find gazel on the GOPATH." | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| "${gazel}" -root="$(kube::realpath ${KUBE_ROOT})" | ||||
| kazel -root="$(kube::realpath ${KUBE_ROOT})" | ||||
|   | ||||
| @@ -20,25 +20,13 @@ set -o pipefail | ||||
| export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | ||||
|  | ||||
| go get gopkg.in/mikedanese/gazel.v17/gazel | ||||
|  | ||||
| # Remove generated files prior to running gazel. | ||||
| # Remove generated files prior to running kazel. | ||||
| # TODO(spxtr): Remove this line once Bazel is the only way to build. | ||||
| rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go" | ||||
|  | ||||
| for path in ${GOPATH//:/ }; do | ||||
|   if [[ -e "${path}/bin/gazel" ]]; then | ||||
|     gazel="${path}/bin/gazel" | ||||
|     break | ||||
|   fi | ||||
| done | ||||
| if [[ -z "${gazel:-}" ]]; then | ||||
|   echo "Couldn't find gazel on the GOPATH." | ||||
|   exit 1 | ||||
| fi | ||||
| kube::util::go_install_from_commit github.com/kubernetes/repo-infra/kazel fd3ec969104295f8484a32114ce625955a67365d | ||||
|  | ||||
|  | ||||
| if ! "${gazel}" -validate -print-diff -root="$(kube::realpath ${KUBE_ROOT})" ; then | ||||
| if ! kazel -validate -print-diff -root="$(kube::realpath ${KUBE_ROOT})" ; then | ||||
|   echo | ||||
|   echo "Run ./hack/update-bazel.sh" | ||||
|   exit 1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeff Grafton
					Jeff Grafton