* Add go.mod for simapp * creating dep check script * new version of cosmos-sdk * tests/ must be a module also if it is to test simapp * maybe add a github action which should fail * mv tests/mocks -> testutil/mock * Refactor usages of tests/mocks * update build command * fix rosetta tests * go mod tidy * use cosmossdk.io/simapp * Update sim entrypoints * use simapp as a module * go mod tidy * Add replaced for vuln package * fix vuln dep * this CI run should fail * this CI run should succeed * use absolute path in makefile
21 lines
409 B
Bash
Executable File
21 lines
409 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
|
|
SIMAPP_REGEX="cosmossdk.io/simapp"
|
|
CWD=$(pwd)
|
|
|
|
|
|
find . -type f -name 'go.mod' -print0 | while IFS= read -r -d '' file
|
|
do
|
|
d=$(dirname "$file")
|
|
if [[ "$d" =~ \./simapp$|\./tests$ ]]; then
|
|
continue
|
|
fi
|
|
|
|
if cd "$CWD/$d" && go list -test -f '{{ .Imports }}' ./... | grep -q -E "${SIMAPP_REGEX}"; then
|
|
echo "${d} has a dependency on simapp!"
|
|
exit 1
|
|
fi
|
|
done
|