aboutsummaryrefslogtreecommitdiffstats
path: root/justfile
blob: e7a5fd18647435add456e0ee9901ba2e6033773c (plain) (blame)
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
# Default recipe, when nothing's selected
[private]
default:
  just --choose

# Run benchmarks and compare to previous runs.
bench:
  cargo bench --features=bench

# Build zjstatus with the tracing feature enabled.
build:
  cargo build --features tracing

# Build zjstatus with tracing and start a zellij session with the dev layout.
run target="zjstatus": build
  #!/usr/bin/env bash
  case "{{target}}" in
  "zjframes")
    zellij -s zjframes-dev --config ./tests/zjframes/config.kdl -n ./tests/zjframes/layout.kdl
    ;;
  *)
    zellij \
      -s zjstatus-dev \
      --config ./tests/zjstatus/config.kdl \
      -n ./tests/zjstatus/layout.kdl
    ;;
  esac

# Watch and run tests with nextest.
test:
  cargo watch -x "nextest run --lib"

# Lint with clippy and cargo audit.
lint:
  cargo clippy --all-features --lib
  cargo audit

# Create and push a new release version.
release:
  #!/usr/bin/env bash
  export VERSION="$( git cliff --bumped-version )"
  cargo set-version "${VERSION:1}"
  direnv exec . cargo build --release
  git commit -am "chore: bump version to $VERSION"
  git tag -m "$VERSION" "$VERSION"
  git push origin main
  git push origin "$VERSION"