From c6c90a5c9135c0bc707f1318d313a364c66350e6 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:34:14 +0100 Subject: [PATCH] fix: remove usage of `cargo install` and prefer `cargo build` (#24) --- noirup | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/noirup b/noirup index 8f9f8db..46513c2 100755 --- a/noirup +++ b/noirup @@ -53,8 +53,8 @@ main() { # Remove prior installations if they exist rm -f "$NARGO_BIN_DIR/nargo" - # Symlink from local repo binaries to bin dir - ensure ln -s "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" + # Move the binary into the `nargo/bin` directory + ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" say "done" exit 0 @@ -145,9 +145,14 @@ main() { say "installing at commit ${NOIRUP_COMMIT}" ensure git checkout ${NOIRUP_COMMIT} fi - # Build the repo and install it locally to the .nargo bin directory. - # --root appends /bin to the directory it is given, so we pass NARGO_HOME. - RUSTFLAGS="-C target-cpu=native" ensure cargo install --path ./crates/nargo --bins --locked --force --root $NARGO_HOME + + RUSTFLAGS="-C target-cpu=native" ensure cargo build --release + + # Remove prior installations if they exist + rm -f "$NARGO_BIN_DIR/nargo" + + # Move the binary into the `nargo/bin` directory + ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" fi