diff --git a/Makefile b/Makefile index 4e883c8d8bb..f31a9c8742e 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,9 @@ include contrib/devtools/Makefile BUILD_TARGETS := build install +tidy-all: + ./scripts/go-mod-tidy-all.sh + build: BUILD_ARGS=-o $(BUILDDIR)/ build-linux: GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build diff --git a/scripts/go-mod-tidy-all.sh b/scripts/go-mod-tidy-all.sh new file mode 100755 index 00000000000..72b2b9d0e2f --- /dev/null +++ b/scripts/go-mod-tidy-all.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +for modfile in $(find . -name go.mod); do + echo "Updating $modfile" + DIR=$(dirname $modfile) + (cd $DIR; go mod tidy) +done \ No newline at end of file