Merge pull request #11166 from ethereum/cmdLineTestsDevVersionFix

This commit is contained in:
Đorđe Mijović 2021-03-25 19:06:26 +01:00 committed by GitHub
commit d75a132f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -174,7 +174,7 @@ If you want to use string parameters or other types, you need to convert them to
::
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.3;
pragma solidity ^0.8.4;
contract C {
bytes s = "Storage";

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
)