mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Better regex for finding version pragmas and replace it with >=0.0
There is a bug which stops ^0 from working.
This commit is contained in:
parent
321ab08102
commit
c9f468b717
@ -178,7 +178,7 @@ do
|
||||
echo " - $dir"
|
||||
cd "$dir"
|
||||
# Replace version pragmas
|
||||
find . -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [^;]+/pragma solidity ^0/'
|
||||
find . -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [\^0-9\.]*/pragma solidity >=0.0/'
|
||||
compileFull -w *.sol */*.sol
|
||||
cd ..
|
||||
fi
|
||||
|
@ -59,7 +59,7 @@ function test_truffle
|
||||
if [ "$name" == "Zeppelin" -o "$name" == "Gnosis" ]; then
|
||||
echo "Replaced fixed-version pragmas..."
|
||||
# Replace fixed-version pragmas in Gnosis (part of Consensys best practice)
|
||||
find contracts test -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [^;]+/pragma solidity ^0/'
|
||||
find contracts test -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity [\^0-9\.]*/pragma solidity >=0.0/'
|
||||
fi
|
||||
assertsol="node_modules/truffle/build/Assert.sol"
|
||||
if [ -f "$assertsol" ]
|
||||
|
Loading…
Reference in New Issue
Block a user