From 317981a13c9faf791a2760a07e9808a8474ecae2 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 1 Aug 2023 13:59:51 -0300 Subject: [PATCH] chore(scripts): Convenience script to update local generated artifacts (#1349) Adds a convenience script that updates all local generated artifacts. Useful after pulling latest master on a working copy that's already set up. When no changes are needed, it runs in about 10s (most of it being recompiling noir contracts, since we are not detecting if rebuild is needed or not for them), compared to a bootstrap.sh run that takes over 1min. --- scripts/update.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/update.sh diff --git a/scripts/update.sh b/scripts/update.sh new file mode 100755 index 00000000000..76446d014a4 --- /dev/null +++ b/scripts/update.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -eu + +# Script for running after updating the working copy with remote changes. +# Similar to bootstrap, but more lightweight and oriented towards working on end-to-end. + +echo -e '\033[1mRebuild L1 contracts...\033[0m' +(cd l1-contracts && forge build) + +echo -e '\n\033[1mUpdate npm deps...\033[0m' +(cd yarn-project && yarn install) + +echo -e '\n\033[1mRebuild Noir contracts...\033[0m' +(cd yarn-project/noir-contracts && yarn noir:build:all 2> /dev/null) + +echo -e '\n\033[1mRebuild circuits wasm...\033[0m' +(cd circuits/cpp && cmake --build --preset wasm -j --target aztec3-circuits.wasm) \ No newline at end of file