Enabling running cmd line tests on currently unreleased version.

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Djordje Mijovic 2021-03-25 12:31:34 +01:00
parent ecf7f21d55
commit 08993a3282

View File

@ -352,6 +352,7 @@ SOLTMPDIR=$(mktemp -d)
set -e
cd "$SOLTMPDIR"
"$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/docs/ docs
developmentVersion=$("$REPO_ROOT/scripts/get_version.sh")
for f in *.sol
do
@ -378,6 +379,10 @@ SOLTMPDIR=$(mktemp -d)
then
opts+=(-o)
fi
# Disable the version pragma in code snippets that only work with the current development version.
# It's necessary because x.y.z won't match `^x.y.z` or `>=x.y.z` pragmas until it's officially released.
sed -i.bak -E -e 's/pragma[[:space:]]+solidity[[:space:]]*(\^|>=)[[:space:]]*'"$developmentVersion"'/pragma solidity >0.0.1/' "$f"
compileFull "${opts[@]}" "$SOLTMPDIR/$f"
done
)