summarylogtreecommitdiffstats
path: root/justfile
blob: eb142a3cb9d3ea7111a3016ff525fc58ab23b4fd (plain)
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
#!/usr/bin/env just --justfile

test: clean prep build check

prep:
  updpkgsums
  makepkg --printsrcinfo > .SRCINFO

build:
  paru -Bi .

check:
  #!/usr/bin/env bash
  set -euo pipefail
  namcap PKGBUILD
  echo "-> Running namcap on built package..."
  pkgfile=$(ls *.pkg.tar.* 2>/dev/null | head -n1)
  if [ -z "$pkgfile" ]; then
      echo "No built package found. Run 'paru -Bi .' first." >&2
      exit 1
  fi
  echo "Checking $pkgfile"
  namcap "$pkgfile"

clean:
  paru -Rns --noconfirm cheznav || true
  rm -f *.tar.gz
  rm -f *.tar.zst
  rm -f -rf pkg/
  rm -f -rf src/