-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
42 lines (35 loc) · 922 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name := "everygarf"
# Check, build, install, publish
release:
just install-deps &&\
just check &&\
cargo install --path . &&\
cargo build --release &&\
just cross &&\
just dist &&\
just publish
# Install build dependencies
install-deps:
cargo install cross &&\
rustup component add clippy
# Test, format, and lint
check:
cargo test &&\
cargo fmt --check &&\
cargo clippy
# Cross compile to x86 Windows
cross:
cross build --release --target x86_64-pc-windows-gnu
# Move release builds to dist directory
dist:
[ -e dist/ ] && rm -rf dist/ ;\
mkdir dist/ &&\
mv target/release/{{name}} dist/ &&\
mv target/x86_64-pc-windows-gnu/release/{{name}}.exe dist/ &&\
ls dist
# Publish to Crates.io
publish:
printf "Publish to crates.io? (Y/n) " &&\
read -r r ;\
case "${r:-Y}" in [yY]|[yY][eE][sS]) ;; *) exit 0 ;; esac &&\
cargo publish