From 4d46ec53ca337e118754c5fc50f02634b6a83380 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Sun, 16 Jun 2019 22:00:57 +0530 Subject: [PATCH] Fix scripts to not rely on codegen scripts being executable If someone doesn't have code-generator in their GOPATH, they'll need to run `go mod vendor` to populate the vendor directory with the code-generator repo (it is required by `hack/tools.go`). However, `go mod vendor` does not mark scripts as executable which leads to a `Permission denied` error while trying to run `update-codegen.sh` in staging repos. So fix scripts to not rely on codegen scripts being executable. Kubernetes-commit: 391da79abd7a7af1cfab04de35daba7cd58c4c80 --- hack/update-codegen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 5562672b..c5fb306c 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -25,7 +25,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code- # --output-base because this script should also be able to run inside the vendor dir of # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir # instead of the $GOPATH directly. For normal projects this can be dropped. -"${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client,informer,lister" \ +bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client,informer,lister" \ k8s.io/sample-controller/pkg/generated k8s.io/sample-controller/pkg/apis \ samplecontroller:v1alpha1 \ --output-base "$(dirname "${BASH_SOURCE[0]}")/../../.." \