Skip to content

Commit

Permalink
imp: add go mod tidy all script (cosmos#4845)
Browse files Browse the repository at this point in the history
* feat: add go mod tidy all script

* feedback

---------

Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
  • Loading branch information
julienrbrt and DimitrisJim authored Oct 16, 2023
1 parent 0d524ec commit 9605c9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions scripts/go-mod-tidy-all.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9605c9e

Please sign in to comment.