summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorgy95 <guoyao17@huawei.com>2022-04-26 14:14:48 +0800
committergy95 <guoyao17@huawei.com>2022-04-26 15:55:35 +0800
commit132dea9c8858fb716860ca84e3637d8da334db4d (patch)
treedd61506b98914f9f87ee70864ede5f6fb0546990 /hack
parentMerge pull request #3780 from fisherxu/remove-gopath (diff)
downloadkubeedge-132dea9c8858fb716860ca84e3637d8da334db4d.tar.gz
fix unbound variable GOPATH
Signed-off-by: gy95 <guoyao17@huawei.com>
Diffstat (limited to 'hack')
-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" \