-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
41 lines (29 loc) · 712 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
pre_commit_hook_script := """
#!/usr/bin/env bash
set -Eeuo pipefail
just pre-commit
git add -u
if git diff --cached --quiet; then
echo "No changes to commit after formatting"
exit 1
fi
"""
alias dev := develop
build *args='':
pnpm tauri build {{args}}
# for convenience
cargo *args='':
cd src-tauri && cargo {{args}}
develop:
pnpm tauri dev
install-pre-commit-hook:
echo '{{pre_commit_hook_script}}' > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
pre-commit:
cd src-tauri && cargo clippy -- -Dwarnings
cd src-tauri && cargo fmt --all
pnpm exec prettier . --write
black bin/release --line-length 120
release:
bin/release
setup:
pnpm install