From cc32b533da06ce6438beceb0716718188e6b2d63 Mon Sep 17 00:00:00 2001 From: endernon Date: Mon, 16 Dec 2024 00:38:05 +0000 Subject: [PATCH] build script --- build_x64.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build_x64.sh diff --git a/build_x64.sh b/build_x64.sh new file mode 100755 index 0000000..5fa5740 --- /dev/null +++ b/build_x64.sh @@ -0,0 +1,19 @@ +cargo build --target x86_64-unknown-linux-musl --package rpfixer --bin rpfixer --release +cargo build --target x86_64-pc-windows-gnu --package rpfixer --bin rpfixer --release + +mkdir -p product + +cp ./target/x86_64-pc-windows-gnu/release/rpfixer.exe ./product/rpfixer-windows-x64.exe +cp ./target/x86_64-unknown-linux-gnu/release/rpfixer ./product/rpfixer-linux-x64 + +pkgversion=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "rpfixer") | .version') +echo "package version is:" +echo $pkgversion +balls=${pkgversion::-1} +balls2=${balls:1} +echo $balls2 + +cd product + +zip "rpfixer-windows-x64-${balls2}.zip" rpfixer-windows-x64.exe +zip "rpfixer-linux-x64-${balls2}.zip" rpfixer-linux-x64