From 3f2d75611473c143c0f499d0e014f33ee1a2e645 Mon Sep 17 00:00:00 2001 From: aniko33 Date: Fri, 8 Sep 2023 15:57:09 +0200 Subject: [PATCH] New building script --- dev/build_dist.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dev/build_dist.sh diff --git a/dev/build_dist.sh b/dev/build_dist.sh new file mode 100644 index 0000000..2d9852d --- /dev/null +++ b/dev/build_dist.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +platforms=( + "aarch64-apple-darwin" + "i686-pc-windows-gnu" + "i686-unknown-linux-gnu" + "x86_64-apple-darwin" + "x86_64-pc-windows-gnu" + "x86_64-unknown-linux-gnu" +) + +if [[ ! -d "dist" ]]; then + mkdir dist +fi + +for platform in ${platforms[@]} +do + echo -e "[ \033[0;32m$platform\033[0m ]" + cargo build -r --target $platform + + if [ -f "target/$platform/release/kmh-cli" ]; then + mv target/$platform/release/kmh-cli dist/kmh_$platform + else + mv target/$platform/release/kmh-cli.exe dist/kmh_$platform.exe + fi +done \ No newline at end of file