summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhack/generate-crds.sh1
-rwxr-xr-xhack/update-codegen.sh2
2 files changed, 3 insertions, 0 deletions
diff --git a/hack/generate-crds.sh b/hack/generate-crds.sh
index ed0fd7fb0..167260499 100755
--- a/hack/generate-crds.sh
+++ b/hack/generate-crds.sh
@@ -57,6 +57,7 @@ function :pre:install: {
if [ "$(which controller-gen)" == "" ]; then
echo "Start to install controller-gen tool"
GO111MODULE=on go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2
+ GOPATH="${GOPATH:-$(go env GOPATH)}"
export PATH=$PATH:$GOPATH/bin
fi
}
diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh
index e281c06d1..5cdfcf440 100755
--- a/hack/update-codegen.sh
+++ b/hack/update-codegen.sh
@@ -20,6 +20,8 @@ set -o pipefail
KUBEEDGE_ROOT=$(unset CDPATH && cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
+export GOPATH="${GOPATH:-$(go env GOPATH)}"
+
${KUBEEDGE_ROOT}/hack/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/kubeedge/kubeedge/pkg/client github.com/kubeedge/kubeedge/pkg/apis \
"devices:v1alpha2 reliablesyncs:v1alpha1 rules:v1" \