Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoljub-duric authored Aug 30, 2024
1 parent 95aee91 commit 4956a40
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions rust/basic_bitcoin/src/basic_bitcoin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@ else
cargo build --target $TARGET --release
fi

ic-wasm \
"$SCRIPT_DIR/../../target/$TARGET/release/$CANISTER.wasm" \
-o "$SCRIPT_DIR/../../target/$TARGET/release/$CANISTER.wasm" \
metadata candid:service -f "$SCRIPT_DIR/basic_bitcoin.did" -v public
cargo install ic-wasm --version 0.2.0 --root ./
STATUS=$?

if [[ "$STATUS" -eq "0" ]]; then
./ic-wasm \
"$SCRIPT_DIR/../../target/$TARGET/release/$CANISTER.wasm" \
-o "$SCRIPT_DIR/../../target/$TARGET/release/$CANISTER.wasm" \
metadata candid:service -f "$SCRIPT_DIR/basic_bitcoin.did" -v public
true
else
echo Could not install ic-wasm
false
fi

popd

0 comments on commit 4956a40

Please sign in to comment.