External tests: Replace hard-coded version in force_truffle_version() with a parameter

This commit is contained in:
Kamil Śliwak 2020-12-02 00:55:12 +01:00
parent e10712c173
commit bbf2471f64
2 changed files with 3 additions and 3 deletions

View File

@ -85,9 +85,9 @@ function download_project
function force_truffle_version
{
local repo="$1"
local version="$1"
sed -i 's/"truffle":\s*".*"/"truffle": "^5.0.42"/g' package.json
sed -i 's/"truffle":\s*".*"/"truffle": "'"$version"'"/g' package.json
}
function truffle_setup

View File

@ -35,7 +35,7 @@ function gnosis_safe_test
truffle_setup https://github.com/solidity-external-tests/safe-contracts.git development_070
force_truffle_version
force_truffle_version ^5.0.42
sed -i 's|github:gnosis/mock-contract#sol_0_5_0|github:solidity-external-tests/mock-contract#master_070|g' package.json
rm -f package-lock.json
rm -rf node_modules/