[v11.2.x] Chore: Add go workspace scripts (#92297)

Chore: Add go workspace scripts (#91707)

(cherry picked from commit 7f155b2b6f)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
This commit is contained in:
Yuri Tseretyan
2024-08-22 10:51:46 -04:00
committed by GitHub
co-authored by Todd Treece
parent b9f332b9a7
commit d79822db37
17 changed files with 1472 additions and 44 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
for mod in $(go run scripts/go-workspace/main.go list-submodules --path "${REPO_ROOT}/go.work"); do
pushd "${mod}"
echo "Running go mod tidy in ${mod}"
go mod tidy
popd
done
pushd "${REPO_ROOT}"
echo "running go mod download"
go mod download
echo "running go work sync"
go work sync