Skip to content

Commit

Permalink
New building script
Browse files Browse the repository at this point in the history
  • Loading branch information
aniko33 committed Sep 8, 2023
1 parent 4d2e1d3 commit 3f2d756
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dev/build_dist.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3f2d756

Please sign in to comment.