forked from hyperledger-labs/weaver-dlt-interoperability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go-mod-tidy.sh
27 lines (24 loc) · 801 Bytes
/
go-mod-tidy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Root of repo
ROOT_DIR=${1:-'.'}
GOMODULE_PATHS=("core/network/fabric-interop-cc/libs/utils"
"core/network/fabric-interop-cc/libs/assetexchange"
"core/network/fabric-interop-cc/interfaces/asset-mgmt"
"core/network/fabric-interop-cc/contracts/interop"
"sdks/fabric/go-sdk"
"samples/fabric/go-cli"
"samples/fabric/simpleasset"
"samples/fabric/simpleassetandinterop"
"samples/fabric/simpleassettransfer"
"samples/fabric/simplestatewithacl"
"samples/fabric/simplestate")
for GOMODULE in ${GOMODULE_PATHS[@]}; do
echo "############# START $GOMODULE ################"
pushd $ROOT_DIR/$GOMODULE > /dev/null
go mod tidy
make run-vendor || (go mod tidy && make run-vendor)
make undo-vendor
go mod tidy
popd > /dev/null
echo "############# END $GOMODULE ################\n"
done