Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (58 loc) · 1.51 KB
/
Copy pathjustfile
File metadata and controls
72 lines (58 loc) · 1.51 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
set positional-arguments
set shell := ["bash", "-cue"]
set dotenv-load := true
root_dir := `git rev-parse --show-toplevel`
flake_dir := root_dir / "tools/nix"
output_dir := root_dir / ".output"
build_dir := output_dir / "build"
mod nix "./tools/just/nix.just"
mod changelog "./tools/just/changelog.just"
# Default target if you do not specify a target.
default:
just --list --unsorted
# Enter the default Nix development shell and execute the command `"$@`.
develop *args:
just nix::develop "default" "$@"
# Format the project.
format *args:
just setup && \
nix run --accept-flake-config {{flake_dir}}#treefmt -- "$@"
# Setup the project.
setup *args:
just main setup
# Run commands over the ci development shell.
ci *args:
just nix::develop "ci" "$@"
[group('general')]
clean:
rm -rf .output
# Lint the project.
[group('lint')]
lint *args:
echo "TODO: Not implemented"
# Build.
[group('build')]
build *args:
just main build "$@"
[group('build')]
[private]
watch *args:
just main watch "$@"
# Run the markdown render services.
[group('build')]
serve *args:
#!/usr/bin/env bash
nix run --show-trace -L "{{flake_dir}}#serve" -- -U "$@"
# Dispatch to the main.nu script
[group('general')]
[private]
main *args:
nu tools/scripts/main.nu "$@"
[group('maintenance')]
[private]
publish *args:
just main package-html
cp -r "{{output_dir}}/package/techmd" docs
just build pdf
mkdir -p docs/techmd/pdf
cp -r "{{build_dir}}/techmd/content.pdf" docs/techmd/pdf/content.pdf