-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
53 lines (43 loc) · 1.22 KB
/
justfile
File metadata and controls
53 lines (43 loc) · 1.22 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
set positional-arguments
set shell := ["bash", "-cue"]
comp_dir := justfile_directory()
root_dir := `git rev-parse --show-toplevel`
output_dir := root_dir / ".output"
flake_dir := root_dir / "./tools/nix"
mod maintenance "./tools/just/maintenance.just"
mod nix "./tools/just/nix.just"
# Default target if you do not specify a target.
default:
just --list --unsorted
# Create a new project from a template.
[group('general')]
create *args:
just develop ./tools/scripts/create.sh "$@"
# Format the whole repository.
[group('general')]
format *args:
"{{root_dir}}/tools/scripts/setup-config-files.sh"
nix run --accept-flake-config {{flake_dir}}#treefmt -- "$@"
# Setup the repository.
[group('general')]
setup *args:
just maintenance::setup "$@"
# Clean output folder.
[group('general')]
clean:
rm -rf ./.output
# Test everything.
[group('general')]
test:
just maintenance::test-all
# Show all packages configured in the Nix `flake.nix`.
[group('general')]
nix-list *args:
cd tools/nix && nix flake --no-pure-eval show
# Enter the default Nix development shell.
[group('general')]
develop *args:
just nix::develop default "$@"
# Enter the CI Nix development shell.
ci *args:
just nix::develop ci "$@"