-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
75 lines (60 loc) · 1.81 KB
/
justfile
File metadata and controls
75 lines (60 loc) · 1.81 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
default:
@just --list
# Auto-format the source tree
fmt:
treefmt
# Run 'cargo run' on the project
run *ARGS:
just dont-fuck-my-build
cargo run {{ARGS}}
# Run 'cargo watch' to run the project (auto-recompiles)
watch *ARGS:
cargo watch -x "run -- {{ARGS}}"
# Show the current state of the project
show:
just dont-fuck-my-build
just om show .
# Ensure no untracked or uncommitted .nix files are left out
dont-fuck-my-build:
git ls-files --others --exclude-standard -- '*.nix' | xargs -r git add -v | lolcat
echo "No chance your build is fucked! 👍" | lolcat
# Run the 'omnix' tool with the provided arguments
om *ARGS:
nix run github:juspay/omnix -- {{ ARGS }}
# Check the health of the project
health:
just dont-fuck-my-build
just om health .
# Clean up build artifacts and temporary files
clean:
rm -rfv result
cargo clean
quick-results
# Update a single flake input using a nice little tool created by vimjoyer
single-update:
nix run github:gignsky/nix-update-input
# Update dependencies and the Nix flake lock file, committing the changes
update:
just dont-fuck-my-build
cargo-update
nix flake update --commit-lock-file
# Update dependencies and the Nix flake lock file without committing the changes
update-no-commit:
just dont-fuck-my-build
cargo-update --no-commit
nix flake update
# Update only the Nix flake lock file, committing the changes
update-flake:
nix flake update --commit-lock-file
# Update only the Nix flake lock file without committing the changes
update-flake-no-commit:
nix flake update
# Build the project using Nix with the provided arguments
build *ARGS:
nix build {{ ARGS }}
quick-results
# Check the project using Nix flake and other tools
check *ARGS:
just dont-fuck-my-build
nix flake check --impure --no-build {{ ARGS }}
nix-shell -p lolcat --run 'echo "[CHECK] Finished." | lolcat'