Merge pull request #1485 from KPrasch/cent

Fixes #828 - Allow solc install script to crash instead of report success
pull/1491/head
K Prasch 2019-12-03 15:14:31 -08:00 committed by GitHub
commit 1d4fe6f790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -288,7 +288,7 @@ commands:
command: pip3 install -r dev-requirements.txt --user -e .
- run:
name: Install Solidity Compiler
command: ./scripts/installation/install_solc.sh
command: sudo ./scripts/installation/install_solc.sh
- check_nucypher_entrypoints
save_dependency_cache:

View File

@ -1,11 +1,21 @@
#!/usr/bin/env bash
set -e
if [[ "$OSTYPE" != "linux-gnu" ]]; then
echo "This installation script is only compatible with linux-gnu-based operating systems."
exit 0
fi
SOLC_VER="0.5.9"
SOL_BIN_PATH=~/.local/bin/solc
SOL_BIN_PATH=$(dirname $(which python))/solc
# Get solc binary for linux
echo "Downloading solidity compiler binary to: ${SOL_BIN_PATH}"
wget "https://github.com/ethereum/solidity/releases/download/v${SOLC_VER}/solc-static-linux" -O ${SOL_BIN_PATH}
# Set executable permission
echo "Setting executable permission on ${SOL_BIN_PATH}"
chmod +x ${SOL_BIN_PATH}
echo "Successfully Installed solc ${SOLC_VER}"