-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: split out yarn-project bootstrap.sh (#1790)
Allows for more modular bootstrapping.
- Loading branch information
Showing
3 changed files
with
40 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
# Navigate to script folder | ||
cd "$(dirname "$0")" | ||
|
||
if [ "$(uname)" = "Darwin" ]; then | ||
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158 | ||
echo "Note: not sourcing nvm on Mac, see github #158" | ||
else | ||
\. ~/.nvm/nvm.sh | ||
fi | ||
nvm install | ||
|
||
yarn install --immutable | ||
|
||
# Build the necessary dependencies for noir contracts typegen. | ||
for DIR in foundation noir-compiler circuits.js; do | ||
echo "Building $DIR..." | ||
cd $DIR | ||
yarn build | ||
cd .. | ||
done | ||
|
||
# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it. | ||
yarn --cwd circuits.js remake-bindings | ||
yarn --cwd circuits.js remake-constants | ||
|
||
(cd noir-contracts && ./bootstrap.sh) | ||
(cd .. && l1-contracts/bootstrap.sh) | ||
|
||
# Until we push .yarn/cache, we still need to install. | ||
yarn | ||
# We do not need to build individual packages, yarn build will build the root tsconfig.json | ||
yarn build | ||
|
||
echo | ||
echo "Success! You can now e.g. run anvil and end-to-end tests" |