Skip to content

Commit 1788fe6

Browse files
authored
chore: split out yarn-project bootstrap.sh (#1790)
Allows for more modular bootstrapping.
1 parent eb8a052 commit 1788fe6

File tree

3 files changed

+40
-35
lines changed

3 files changed

+40
-35
lines changed

bootstrap.sh

+1-35
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,4 @@ if [ ! -f ~/.nvm/nvm.sh ]; then
3535
fi
3636

3737
circuits/cpp/bootstrap.sh
38-
39-
if [ "$(uname)" = "Darwin" ]; then
40-
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
41-
echo "Note: not sourcing nvm on Mac, see github #158"
42-
else
43-
\. ~/.nvm/nvm.sh
44-
fi
45-
nvm install
46-
47-
cd yarn-project
48-
yarn install --immutable
49-
50-
# Build the necessary dependencies for noir contracts typegen.
51-
for DIR in foundation noir-compiler circuits.js; do
52-
echo "Building $DIR..."
53-
cd $DIR
54-
yarn build
55-
cd ..
56-
done
57-
58-
# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
59-
yarn --cwd circuits.js remake-bindings
60-
yarn --cwd circuits.js remake-constants
61-
62-
(cd noir-contracts && ./bootstrap.sh)
63-
(cd .. && l1-contracts/bootstrap.sh)
64-
65-
# Until we push .yarn/cache, we still need to install.
66-
yarn
67-
# We do not need to build individual packages, yarn build will build the root tsconfig.json
68-
yarn build
69-
cd ..
70-
71-
echo
72-
echo "Success! You could now run e.g.: ./scripts/tmux-splits e2e_deploy_contract"
38+
yarn-project/bootstrap.sh

circuits/cpp/bootstrap.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -eu
55

66
export WASI_VERSION=20
77

8+
# Navigate to script folder
89
cd "$(dirname "$0")"
910

1011
# Update the submodule

yarn-project/bootstrap.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
# Navigate to script folder
5+
cd "$(dirname "$0")"
6+
7+
if [ "$(uname)" = "Darwin" ]; then
8+
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
9+
echo "Note: not sourcing nvm on Mac, see github #158"
10+
else
11+
\. ~/.nvm/nvm.sh
12+
fi
13+
nvm install
14+
15+
yarn install --immutable
16+
17+
# Build the necessary dependencies for noir contracts typegen.
18+
for DIR in foundation noir-compiler circuits.js; do
19+
echo "Building $DIR..."
20+
cd $DIR
21+
yarn build
22+
cd ..
23+
done
24+
25+
# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
26+
yarn --cwd circuits.js remake-bindings
27+
yarn --cwd circuits.js remake-constants
28+
29+
(cd noir-contracts && ./bootstrap.sh)
30+
(cd .. && l1-contracts/bootstrap.sh)
31+
32+
# Until we push .yarn/cache, we still need to install.
33+
yarn
34+
# We do not need to build individual packages, yarn build will build the root tsconfig.json
35+
yarn build
36+
37+
echo
38+
echo "Success! You can now e.g. run anvil and end-to-end tests"

0 commit comments

Comments
 (0)