diff --git a/tools/hack/prebuild.sh b/tools/hack/prebuild.sh index fbcbcdc4d..3ec64d419 100755 --- a/tools/hack/prebuild.sh +++ b/tools/hack/prebuild.sh @@ -18,9 +18,6 @@ for repo in ${envoy_repos[@]}; do cp -RP envoy/$repo external/$repo cd external/$repo echo "gitdir: /parent/.git/modules/envoy/$repo" > .git - if [ -f "go.mod" ]; then - go mod tidy -go=${GO_VERSION} - fi cd $WORK_DIR done @@ -33,8 +30,8 @@ for repo in ${istio_repos[@]}; do cp -RP istio/$repo external/$repo cd external/$repo echo "gitdir: /parent/.git/modules/istio/$repo" > .git - if [ -f "go.mod" ]; then - go mod tidy -go=${GO_VERSION} - fi cd $WORK_DIR done + +# Update root go.mod after all external dependencies are ready +go mod tidy