Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
115 lines (96 loc) · 3.07 KB
/
Copy pathjustfile
File metadata and controls
115 lines (96 loc) · 3.07 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
project_dir := justfile_directory()
default:
@just --list --justfile {{ justfile() }}
[group('security')]
audit:
#!/usr/bin/env bash
if ! command -v cargo-audit >/dev/null 2>&1; then
echo "cargo-audit not found, installing..."
if ! command -v cargo binstall >/dev/null 2>&1; then
cargo install --locked cargo-audit
else
echo "installing with cargo binstall"
cargo binstall cargo-outdated
fi
fi
cargo audit
[group('security')]
outdated:
#!/usr/bin/env bash
if ! command -v cargo-outdated >/dev/null 2>&1; then
echo "cargo-outdated not found, installing..."
if ! command -v cargo binstall >/dev/null 2>&1; then
cargo install --locked cargo-outdated
else
echo "installing with cargo binstall"
cargo binstall cargo-outdated
fi
fi
cargo outdated
[group('security')]
shear:
#!/usr/bin/env bash
if ! command -v cargo-shear >/dev/null 2>&1; then
echo "cargo-shear not found, installing..."
if ! command -v cargo binstall >/dev/null 2>&1; then
cargo install --locked cargo-shear
else
echo "installing with cargo binstall"
cargo binstall cargo-shear
fi
fi
cargo shear
[group('security')]
bloat:
#!/usr/bin/env bash
if ! command -v cargo-bloat >/dev/null 2>&1; then
echo "cargo-bloat not found, installing..."
if ! command -v cargo binstall >/dev/null 2>&1; then
cargo install --locked cargo-bloat
else
echo "installing with cargo binstall"
cargo binstall cargo-bloat
fi
fi
cargo bloat --release
[group('develop')]
format:
cargo +nightly fmt --all
[group('develop')]
fix:
cargo fix --allow-dirty --workspace
[group('develop')]
build profile="dev":
cargo build --profile {{ profile }}
[group('checks')]
lint profile="dev":
cargo +nightly fmt --all -- --check
cargo clippy --profile {{ profile }} --all-targets --workspace -- --deny warnings
[group('checks')]
test profile="dev":
cargo nextest run --cargo-profile {{ profile }} --all-targets --workspace
[group('checks')]
check-feature-combinations:
bash {{ project_dir }}/scripts/check-all-feature-combinations.sh
[group('checks')]
check-default-nix-features:
nix build '.#checks.x86_64-linux.switcharoo-check-nix-configs' -L
[group('checks')]
check profile="dev": (build profile) (lint profile) (test profile)
pre-release: (check "release")
[group('run')]
run profile="dev" *args="":
cargo run --profile {{ profile }} -- {{ args }}
[group('run')]
run-run profile="dev" *args="-vv": (run profile "run" args)
[group('run')]
run-explain-config profile="dev" *args="-vv": (run profile "config explain" args)
[group('run')]
run-debug profile="dev" *args="": (run profile "debug" args)
[group('dist')]
package-usr-lib:
#!/usr/bin/env bash
sudo tar -cvf ar.tar -C /usr/share/switcharoo.debug setup_preview themes
ls -lah ar.tar
sudo mv ar.tar ./packaging/usr-share.tar
sudo chown user:user ./packaging/usr-share.tar