diff --git a/bdk-ffi b/bdk-ffi index a8ff523..f527d0a 160000 --- a/bdk-ffi +++ b/bdk-ffi @@ -1 +1 @@ -Subproject commit a8ff523698121a283b54493624db37f4268e3e6b +Subproject commit f527d0aa7cb6489c2a33773ef2d72ce8c85a62c6 diff --git a/scripts/build-linux-x86_64.sh b/scripts/build-linux-x86_64.sh index 72238c3..306c643 100644 --- a/scripts/build-linux-x86_64.sh +++ b/scripts/build-linux-x86_64.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -euo pipefail COMPILATION_TARGET="x86_64-unknown-linux-gnu" TARGET_DIR="target/x86_64-unknown-linux-gnu/release-smaller" @@ -6,7 +7,7 @@ RESOURCE_DIR="resources/linux-x86-64" LIB_NAME="libbdkffi.so" printf "\nSubmodule check...\n" -if [[ "$1" != "--skip-submodule-update" ]]; then +if [[ "${1:-}" != "--skip-submodule-update" ]]; then git submodule update --init printf "Submodule is checked out at commit: $(git submodule status)\n\n" else @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit # Build the Rust library rustup target add $COMPILATION_TARGET -cargo build --profile release-smaller --target $COMPILATION_TARGET +cargo build --locked --profile release-smaller --target $COMPILATION_TARGET # Generate Kotlin bindings using uniffi-bindgen cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format diff --git a/scripts/build-macos-aarch64.sh b/scripts/build-macos-aarch64.sh index 8e0443a..389b376 100644 --- a/scripts/build-macos-aarch64.sh +++ b/scripts/build-macos-aarch64.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -euo pipefail COMPILATION_TARGET="aarch64-apple-darwin" TARGET_DIR="target/$COMPILATION_TARGET/release-smaller" @@ -6,7 +7,7 @@ RESOURCE_DIR="resources/darwin-aarch64" LIB_NAME="libbdkffi.dylib" printf "\nSubmodule check...\n" -if [[ "$1" != "--skip-submodule-update" ]]; then +if [[ "${1:-}" != "--skip-submodule-update" ]]; then git submodule update --init printf "Submodule is checked out at commit: $(git submodule status)\n\n" else @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit # Build the Rust library rustup target add $COMPILATION_TARGET -cargo build --profile release-smaller --target $COMPILATION_TARGET +cargo build --locked --profile release-smaller --target $COMPILATION_TARGET # Generate Kotlin bindings using uniffi-bindgen cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format diff --git a/scripts/build-macos-x86_64.sh b/scripts/build-macos-x86_64.sh index 8727830..40e06e9 100644 --- a/scripts/build-macos-x86_64.sh +++ b/scripts/build-macos-x86_64.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -euo pipefail COMPILATION_TARGET="x86_64-apple-darwin" TARGET_DIR="target/x86_64-apple-darwin/release-smaller" @@ -6,7 +7,7 @@ RESOURCE_DIR="resources/darwin-x86-64" LIB_NAME="libbdkffi.dylib" printf "\nSubmodule check...\n" -if [[ "$1" != "--skip-submodule-update" ]]; then +if [[ "${1:-}" != "--skip-submodule-update" ]]; then git submodule update --init printf "Submodule is checked out at commit: $(git submodule status)\n\n" else @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit # Build the Rust library rustup target add $COMPILATION_TARGET -cargo build --profile release-smaller --target $COMPILATION_TARGET +cargo build --locked --profile release-smaller --target $COMPILATION_TARGET # Generate Kotlin bindings using uniffi-bindgen cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format diff --git a/scripts/build-windows-x86_64.sh b/scripts/build-windows-x86_64.sh index 5d5a5c3..b2b6072 100644 --- a/scripts/build-windows-x86_64.sh +++ b/scripts/build-windows-x86_64.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -euo pipefail COMPILATION_TARGET="x86_64-pc-windows-msvc" TARGET_DIR="target/x86_64-pc-windows-msvc/release-smaller" @@ -6,7 +7,7 @@ RESOURCE_DIR="resources/win32-x86-64" LIB_NAME="bdkffi.dll" printf "\nSubmodule check...\n" -if [[ "$1" != "--skip-submodule-update" ]]; then +if [[ "${1:-}" != "--skip-submodule-update" ]]; then git submodule update --init printf "Submodule is checked out at commit: $(git submodule status)\n\n" else @@ -19,7 +20,7 @@ cd ./bdk-ffi/bdk-ffi/ || exit # Build the Rust library rustup target add $COMPILATION_TARGET -cargo build --profile release-smaller --target $COMPILATION_TARGET +cargo build --locked --profile release-smaller --target $COMPILATION_TARGET # Generate Kotlin bindings using uniffi-bindgen cargo run --bin uniffi-bindgen generate --library ./$TARGET_DIR/$LIB_NAME --language kotlin --out-dir ../../lib/src/main/kotlin/ --no-format