fixup! bytecode compare: Stop depending on solc-js internal structure and install it via npm from a local dir instead

This commit is contained in:
Kamil Śliwak 2022-01-25 17:12:35 +01:00 committed by Daniel Kirchner
parent 4e395137b9
commit f46e333f9a

View File

@ -42,11 +42,18 @@ TMPDIR=$(mktemp -d)
if [[ "$SOLC_EMSCRIPTEN" = "On" ]] if [[ "$SOLC_EMSCRIPTEN" = "On" ]]
then then
echo "Installing solc-js..."
# npm install solc # npm install solc
git clone --depth 1 https://github.com/ethereum/solc-js.git solc-js git clone --depth 1 https://github.com/ethereum/solc-js.git solc-js
cp "$REPO_ROOT/emscripten_build/libsolc/soljson.js" solc-js/ cp "$REPO_ROOT/emscripten_build/libsolc/soljson.js" solc-js/
pushd solc-js/
npm install
npm run build
popd
cp "$REPO_ROOT/scripts/bytecodecompare/prepare_report.js" . cp "$REPO_ROOT/scripts/bytecodecompare/prepare_report.js" .
( npm install solc-js/ ) npm install solc-js/
echo "Running the compiler..." echo "Running the compiler..."
# shellcheck disable=SC2035 # shellcheck disable=SC2035
./prepare_report.js *.sol > report.txt ./prepare_report.js *.sol > report.txt