From c30efade52ecf7df352b801cf6f2cf95c0d6bf4f Mon Sep 17 00:00:00 2001 From: Luke <11898833+curlpipe@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:28:12 +0000 Subject: [PATCH] More advanced build script including deb, rpm and binaries for unix/windows all in one --- build.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build.sh b/build.sh index a964e57f..9fec1233 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,21 @@ +# Initial set-up +mkdir -p target/pkgs +rm target/pkgs/* + +# Build for Linux +## Binary cargo build --release strip -s target/release/ox +cp target/release/ox target/pkgs/ox +## RPM +rm target/generate-rpm/*.rpm cargo generate-rpm +cp target/generate-rpm/*.rpm target/pkgs/ +## DEB cargo deb +cp target/debian/*.deb target/pkgs/ + +# Build for Windows (binary) +cargo build --release --target x86_64-pc-windows-gnu +strip -s target/x86_64-pc-windows-gnu/release/ox.exe +cp target/x86_64-pc-windows-gnu/release/ox.exe target/pkgs/ox.exe