mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-13 12:32:51 +02:00
gomod: run go mod tidy for all modules
Also add the `make tidy-module` copied from `lnd`.
This commit is contained in:
parent
8817ebdd39
commit
fbe65bfc01
5 changed files with 33 additions and 12 deletions
17
scripts/tidy_modules.sh
Executable file
17
scripts/tidy_modules.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
SUBMODULES=$(find . -mindepth 2 -name "go.mod" | cut -d'/' -f2)
|
||||
|
||||
|
||||
# Run 'go mod tidy' for root.
|
||||
go mod tidy
|
||||
|
||||
# Run 'go mod tidy' for each module.
|
||||
for submodule in $SUBMODULES
|
||||
do
|
||||
pushd $submodule
|
||||
|
||||
go mod tidy
|
||||
|
||||
popd
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue