mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
github+Makefile: add new action make tidy-module-check
This commit adds `tidy-module` and `tidy-module-check` to make sure the modules are always tidy.
This commit is contained in:
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
|
Reference in New Issue
Block a user