Skip to content

Commit

Permalink
More advanced build script including deb, rpm and binaries for unix/w…
Browse files Browse the repository at this point in the history
…indows all in one
  • Loading branch information
curlpipe committed Nov 1, 2024
1 parent 131e170 commit c30efad
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c30efad

Please sign in to comment.