From f98d2e405b54fbc972826effefb75115a69841b4 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 20 Sep 2023 10:19:21 -0600 Subject: [PATCH] rust version change for epiccash building --- scripts/android/build_all.sh | 10 ++++++++++ scripts/ios/build_all.sh | 11 ++++++++++- scripts/linux/build_all.sh | 10 ++++++++++ scripts/macos/build_all.sh | 11 ++++++++++- scripts/rust_version.sh | 19 +++++++++++++++++++ scripts/windows/build_all.sh | 9 +++++++++ 6 files changed, 68 insertions(+), 2 deletions(-) create mode 100755 scripts/rust_version.sh diff --git a/scripts/android/build_all.sh b/scripts/android/build_all.sh index a0050dc9e..19e2ec64c 100755 --- a/scripts/android/build_all.sh +++ b/scripts/android/build_all.sh @@ -1,5 +1,11 @@ #!/bin/bash +set -e + +# libepiccash requires old rust +source ../rust_version.sh +set_rust_to_1680 + mkdir build . ./config.sh ./install_ndk.sh @@ -10,3 +16,7 @@ mkdir build wait echo "Done building" + +# set rust (back) to a more recent stable release to allow stack wallet to build tor +set_rust_to_1720 + diff --git a/scripts/ios/build_all.sh b/scripts/ios/build_all.sh index fa6f2ac93..9f1f38252 100755 --- a/scripts/ios/build_all.sh +++ b/scripts/ios/build_all.sh @@ -1,8 +1,17 @@ #!/bin/bash +set -e + +# libepiccash requires old rust +source ../rust_version.sh +set_rust_to_1680 + (cd ../../crypto_plugins/flutter_liblelantus/scripts/ios && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_libepiccash/scripts/ios && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_libmonero/scripts/ios/ && ./build_all.sh ) & wait -echo "Done building" \ No newline at end of file +echo "Done building" + +# set rust (back) to a more recent stable release to allow stack wallet to build tor +set_rust_to_1720 diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index 31edfb872..9a6ee34d9 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -1,5 +1,11 @@ #!/bin/bash +set -e + +# libepiccash requires old rust +source ../rust_version.sh +set_rust_to_1680 + # for arm # flutter-elinux clean # flutter-elinux pub get @@ -12,3 +18,7 @@ mkdir -p build wait echo "Done building" + +# set rust (back) to a more recent stable release to allow stack wallet to build tor +set_rust_to_1720 + diff --git a/scripts/macos/build_all.sh b/scripts/macos/build_all.sh index 646274593..a91fb73b2 100755 --- a/scripts/macos/build_all.sh +++ b/scripts/macos/build_all.sh @@ -1,8 +1,17 @@ #!/bin/bash +set -e + +# libepiccash requires old rust +source ../rust_version.sh +set_rust_to_1680 + (cd ../../crypto_plugins/flutter_liblelantus/scripts/macos && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh ) & wait -echo "Done building" \ No newline at end of file +echo "Done building" + +# set rust (back) to a more recent stable release to allow stack wallet to build tor +set_rust_to_1720 diff --git a/scripts/rust_version.sh b/scripts/rust_version.sh new file mode 100755 index 000000000..9a1974f5d --- /dev/null +++ b/scripts/rust_version.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set_rust_to_1680() { + if rustup toolchain list | grep -q "1.68.0"; then + rustup default 1.68.0 + else + echo "Rust version 1.68.0 is not installed. Please install it using 'rustup toolchain install 1.68.0'." >&2 + exit 1 + fi +} + +set_rust_to_1720() { + if rustup toolchain list | grep -q "1.72.0"; then + rustup default 1.72.0 + else + echo "Rust version 1.72.0 is not installed. Please install it using 'rustup toolchain install 1.72.0'." >&2 + exit 1 + fi +} \ No newline at end of file diff --git a/scripts/windows/build_all.sh b/scripts/windows/build_all.sh index a96271cc3..3c57e45ba 100755 --- a/scripts/windows/build_all.sh +++ b/scripts/windows/build_all.sh @@ -1,5 +1,11 @@ #!/bin/bash +set -e + +# libepiccash requires old rust +source ../rust_version.sh +set_rust_to_1680 + mkdir -p build (cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh ) & @@ -7,3 +13,6 @@ mkdir -p build wait echo "Done building" + +# set rust (back) to a more recent stable release to allow stack wallet to build tor +set_rust_to_1720