Add script for updating go.mod to use local plugeth-statediff #3
@ -11,6 +11,7 @@ fi
|
||||
|
||||
CURRENT_REPLACEMENTS=$(go mod edit --json | jq -r '.Replace[] | "\(.Old.Path) \(.New.Path)"')
|
||||
|
||||
echo "github.com/cerc-io/plugeth-statediff=${PLUGETH_STATEDIFF_DIR}"
|
||||
go mod edit --replace "github.com/cerc-io/plugeth-statediff=${PLUGETH_STATEDIFF_DIR}"
|
||||
for r in `go mod edit --json ${PLUGETH_STATEDIFF_DIR}/go.mod | jq -r '.Replace[] | "\(.Old.Path)=\(.New.Path)@\(.New.Version)"'`; do
|
||||
orig=$(echo $r | cut -d'=' -f1)
|
||||
@ -19,6 +20,7 @@ for r in `go mod edit --json ${PLUGETH_STATEDIFF_DIR}/go.mod | jq -r '.Replace[]
|
||||
if [ $? -ne 0 ]; then
|
||||
continue;
|
||||
fi
|
||||
echo "$r"
|
||||
go mod edit --replace "$r"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user