forked from inthehack/noshell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
60 lines (47 loc) · 1.16 KB
/
Justfile
File metadata and controls
60 lines (47 loc) · 1.16 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
#
# This file defines the rules that one can call from the `just` utility.
#
# Authors:
# Julien Peeters <inthehack@mountainhacks.org>
#
set quiet := true
# Initialize environment.
[group('utility')]
mod init 'just/init.just'
# Print this message.
help:
just --list
# Build sources (cargo build).
[group('build')]
build *OPTS:
cargo build --workspace {{ OPTS }}
# Build sources (cargo build).
[group('build')]
build-pkg pkg *OPTS:
cargo build -p {{ pkg }} {{ OPTS }}
# Check if sources are compliant with lint rules (cargo clippy).
[group('quality')]
lint *OPTS:
cargo clippy --workspace {{ OPTS }} -- -D warnings
# Check if sources are compliant with lint rules (cargo clippy --fix).
[group('quality')]
fix *OPTS: && (lint OPTS "--fix")
# Format source code (nix fmt).
[group('quality')]
format *OPTS:
nix fmt {{ OPTS }}
alias fmt := format
# Test all.
test *OPTS:
cargo nextest run --workspace {{ OPTS }}
# Test package.
test-pkg pkg *OPTS:
cargo nextest run -p {{ pkg }} {{ OPTS }}
# Clean the cargo build artifacts.
[group('utility')]
clean:
rm -rf target
# Wipe all non-versioned data.
[group("utility")]
mrproper:
git clean -dffx