summaryrefslogtreecommitdiff
path: root/hack/update-vendor.sh
diff options
context:
space:
mode:
authorKevin Wang <wangzefeng@huawei.com>2019-10-17 17:47:10 +0800
committerKevin Wang <wangzefeng@huawei.com>2019-10-17 17:57:58 +0800
commitec9deebc719bcab6ad932c384fe8e7e37d0a8c1b (patch)
treecf1b6e1a744618ab0711c258679099e36b9b1b6b /hack/update-vendor.sh
parentupdate reporoot/go.mod (diff)
downloadkubeedge-ec9deebc719bcab6ad932c384fe8e7e37d0a8c1b.tar.gz
update-vendor.sh: execute go mod vendor after go mod tidy to ensure dependency correctness.
Diffstat (limited to 'hack/update-vendor.sh')
-rwxr-xr-xhack/update-vendor.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/hack/update-vendor.sh b/hack/update-vendor.sh
index 11dc7657b..60dea49ad 100755
--- a/hack/update-vendor.sh
+++ b/hack/update-vendor.sh
@@ -38,6 +38,11 @@ for repo in $(kubeedge::util::list_staging_repos); do
pushd "${KUBEEDGE_ROOT}/staging/src/github.com/kubeedge/${repo}"
echo "running 'go mod tidy' for ${repo}"
go mod tidy
+
+ # go mod tidy sometimes removes lines that build seems to need. See also https://github.com/golang/go/issues/31248.
+ # We would have to always execute go mod vendor after go mod tidy to ensure correctness.
+ echo "running 'go mod vendor' for ${repo}"
+ go mod vendor
popd
done