Skip to content

Commit 1d1b1b9

Browse files
committed
add check script
1 parent be97a20 commit 1d1b1b9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.justfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ set shell := ["/usr/bin/env", "bash", "-c"]
22

33
spoilers-font := "https://github.com/istudyatuni/spoilers-ahead-font/raw/refs/heads/master/SpoilersAhead.otf"
44
spoilers-font-file := "frontend/public/SpoilersAhead.otf"
5+
linux-static-target := "x86_64-unknown-linux-musl"
6+
win-target := "x86_64-pc-windows-msvc"
57

68
[private]
79
@default:
@@ -37,7 +39,7 @@ run-app:
3739

3840
# build companion app for windows
3941
build-app-win:
40-
cargo xwin b --release --package ow-tracker-companion --target=x86_64-pc-windows-msvc
42+
cargo xwin b --release --package ow-tracker-companion --target={{ win-target }}
4143

4244
# build companion app for linux
4345
build-app:
@@ -59,13 +61,21 @@ build-server:
5961
ghcr.io/rust-cross/rust-musl-cross:x86_64-musl \
6062
cargo build --release \
6163
--package ow-tracker-server \
62-
--target=x86_64-unknown-linux-musl \
64+
--target={{ linux-static-target }} \
6365
--config build.rustc-wrapper="''"
6466

6567
# run rust tests
6668
test *args:
6769
cargo nextest run {{ args }}
6870

71+
# check rust code
72+
check:
73+
cargo fmt --check
74+
cargo clippy -- -D clippy::all
75+
76+
# not work
77+
# cargo xwin clippy --package ow-tracker-companion -- -D clippy::all --target={{ win-target }}
78+
6979
# download spoilers font
7080
download-spoilers-font:
7181
if [[ ! -e "{{ spoilers-font-file }}" ]]; then \

0 commit comments

Comments
 (0)