~kris/dots

srice

srice/.local/bin/blog-build-check -rw-r--r-- 669 bytes
e98f3b03 — Kris Yotam chore: sync local state after restore (push updates, no pull) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env sh
set -eu

run_if() {
  if command -v "$1" >/dev/null 2>&1; then
    printf '\n== %s ==\n' "$*"
    "$@" || return 1
  fi
}

[ -f package.json ] && run_if npm run lint || true
[ -f package.json ] && run_if npm test || true
[ -f package.json ] && run_if npm run build || true
[ -f Makefile ] && run_if make check || true
[ -f Makefile ] && run_if make build || true
[ -f hugo.toml ] || [ -f config.toml ] && run_if hugo --printPathWarnings --printUnusedTemplates || true
[ -f _config.yml ] && run_if bundle exec jekyll build || true
run_if blog-frontmatter || true
run_if blog-future-dates || true
run_if blog-rss-check || true
run_if blog-stats || true