Commit 969e0f37 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: move forge check script to bash

Makes it much faster, will save a lot of time over many
CI runs. The startup time of `ts-node` vs `bash` is just
too large for such a simple script. We depend on unix
filesystems and bash for other commands.
parent 0e2e7112
......@@ -17,7 +17,7 @@
"bindings": "cd ../../op-bindings && make",
"build:with-metadata": "FOUNDRY_PROFILE=echidna yarn build:forge",
"build": "npx nx build:ts && npx nx typechain",
"prebuild:contracts": "yarn ts-node scripts/verify-foundry-install.ts",
"prebuild:contracts": "./scripts/verify-foundry-install.sh",
"build:contracts": "yarn build:hardhat",
"build:forge": "forge build",
"build:hardhat": "hardhat compile",
......@@ -66,7 +66,6 @@
"ethereumjs-wallet": "^1.0.2",
"@defi-wonderland/smock": "^2.0.2",
"@foundry-rs/hardhat-forge": "^0.1.17",
"@foundry-rs/easy-foundryup": "^0.1.3",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.0",
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
......@@ -76,7 +75,6 @@
"@typescript-eslint/parser": "^5.45.1",
"bip39": "^3.0.4",
"chai": "^4.2.0",
"command-exists": "1.2.9",
"dotenv": "^16.0.0",
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",
"ethereum-waffle": "^3.0.0",
......
#!/bin/bash
if ! command -v forge &> /dev/null
then
echo "Is Foundry not installed? Consider installing via `curl -L https://foundry.paradigm.xyz | bash` and then running `foundryup` on a new terminal. For more context, check the installation instructions in the book: https://book.getfoundry.sh/getting-started/installation.html."
exit 1
fi
VERSION=$(forge --version)
echo "Using foundry version: $VERSION"
import { sync as commandExistsSync } from 'command-exists'
if (!commandExistsSync('forge')) {
console.error(
'Command failed. Is Foundry not installed? Consider installing via `curl -L https://foundry.paradigm.xyz | bash` and then running `foundryup` on a new terminal. For more context, check the installation instructions in the book: https://book.getfoundry.sh/getting-started/installation.html.'
)
process.exit(1)
}
......@@ -5546,7 +5546,7 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"
command-exists@1.2.9, command-exists@^1.2.8, command-exists@^1.2.9:
command-exists@^1.2.8, command-exists@^1.2.9:
version "1.2.9"
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69"
integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment