File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # A simple shell script for building binaries, in preparation to be uploaded to GitHub releases.
2+ # Tested on Arch Linux
3+ # Requirements: `cross` (cross-rs)
4+ # May require targets to be added using `rustup target add <target-triple>`
5+
6+ targets=(
7+ x86_64-unknown-linux-gnu
8+ x86_64-pc-windows-gnu
9+ # x86_64-apple-darwin
10+ aarch64-unknown-linux-gnu
11+ )
12+
13+ version=$( cargo run --bin rusty_man_computer -- --version | cut -d ' ' -f 2)
14+
15+ mkdir -p target/dist
16+ for target in " ${targets[@]} " ; do
17+ cross build --release --target " $target "
18+ # Copy both binaries to `target/dist`
19+ cp " target/$target /release/rusty_man_computer" " target/dist/rusty-man-computer-$version -$target " || \
20+ cp " target/$target /release/rusty_man_computer.exe" " target/dist/rusty-man-computer-$version -$target .exe"
21+ cp " target/$target /release/bin_creator" " target/dist/rusty-man-computer-$version -$target " || \
22+ cp " target/$target /release/bin_creator.exe" " target/dist/rusty-man-computer-$version -$target .exe"
23+ done
You can’t perform that action at this time.
0 commit comments