File tree Expand file tree Collapse file tree 6 files changed +13
-10
lines changed Expand file tree Collapse file tree 6 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ function colony_test
41
41
setup_solcjs " $DIR " " $SOLJSON "
42
42
download_project " $repo " " $branch " " $DIR "
43
43
44
- replace_version_pragmas
45
- force_truffle_solc_modules " $SOLJSON "
44
+ neutralize_package_json_hooks
46
45
force_truffle_compiler_settings " $config_file " " ${DIR} /solc" " $min_optimizer_level "
47
46
yarn
48
47
git submodule update --init
Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ function neutralize_package_lock
104
104
rm --force --verbose package-lock.json
105
105
}
106
106
107
+ function neutralize_package_json_hooks
108
+ {
109
+ printLog " Disabling package.json hooks..."
110
+ [[ -f package.json ]] || fail " package.json not found"
111
+ sed -i ' s|"prepublish": *".*"|"prepublish": ""|g' package.json
112
+ sed -i ' s|"prepare": *".*"|"prepare": ""|g' package.json
113
+ }
114
+
107
115
function force_truffle_solc_modules
108
116
{
109
117
local soljson=" $1 "
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ function ens_test
45
45
force_truffle_version ^5.1.55
46
46
47
47
neutralize_package_lock
48
- replace_version_pragmas
49
- force_truffle_solc_modules " $SOLJSON "
48
+ neutralize_package_json_hooks
50
49
force_truffle_compiler_settings " $config_file " " ${DIR} /solc" " $min_optimizer_level "
51
50
npm install
52
51
Original file line number Diff line number Diff line change @@ -46,8 +46,7 @@ function gnosis_safe_test
46
46
sed -i -E ' s|"@gnosis.pm/util-contracts": "[^"]+"|"@gnosis.pm/util-contracts": "github:solidity-external-tests/util-contracts#solc-7_080"|g' package.json
47
47
48
48
neutralize_package_lock
49
- replace_version_pragmas
50
- force_truffle_solc_modules " $SOLJSON "
49
+ neutralize_package_json_hooks
51
50
force_truffle_compiler_settings " $config_file " " ${DIR} /solc" " $min_optimizer_level "
52
51
npm install --package-lock
53
52
Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ function gnosis_safe_test
44
44
sed -i ' s|github:gnosis/mock-contract#sol_0_5_0|github:solidity-external-tests/mock-contract#master_080|g' package.json
45
45
46
46
neutralize_package_lock
47
- replace_version_pragmas
48
- force_truffle_solc_modules " $SOLJSON "
47
+ neutralize_package_json_hooks
49
48
force_truffle_compiler_settings " $config_file " " ${DIR} /solc" " $min_optimizer_level "
50
49
npm install --package-lock
51
50
Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ function zeppelin_test
41
41
setup_solcjs " $DIR " " $SOLJSON "
42
42
download_project " $repo " " $branch " " $DIR "
43
43
44
- replace_version_pragmas
45
- force_truffle_solc_modules " $SOLJSON "
44
+ neutralize_package_json_hooks
46
45
force_truffle_compiler_settings " $config_file " " ${DIR} /solc" " $min_optimizer_level "
47
46
npm install
48
47
You can’t perform that action at this time.
0 commit comments