From bf5785e64eabeef02687235b584d342841a888f1 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 12 Sep 2023 14:43:36 +0100 Subject: [PATCH] chore: update compile script --- yarn-project/noir-contracts/scripts/compile.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yarn-project/noir-contracts/scripts/compile.sh b/yarn-project/noir-contracts/scripts/compile.sh index c867cc125267..b511a54123d3 100755 --- a/yarn-project/noir-contracts/scripts/compile.sh +++ b/yarn-project/noir-contracts/scripts/compile.sh @@ -34,16 +34,15 @@ build() { CONTRACT_NAME=$1 CONTRACT_FOLDER="${CONTRACT_NAME}_contract" echo "Compiling $CONTRACT_NAME..." - cd src/contracts/$CONTRACT_FOLDER - rm -f target/* - + # If the compilation fails, rerun the compilation with 'nargo' and show the compiler output. - nargo compile --output-debug; + nargo compile --package $CONTRACT_FOLDER --output-debug; } echo "Using $(nargo --version)" # Build contracts +rm -f target/* for CONTRACT_NAME in "$@"; do build $CONTRACT_NAME & pids+=($!)