about summary refs log tree commit diff stats
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rwxr-xr-xjustfile11
1 files changed, 11 insertions, 0 deletions
diff --git a/justfile b/justfile
index e4021c0..74ee08f 100755
--- a/justfile
+++ b/justfile
@@ -34,6 +34,17 @@ nix-build what:
 
 watch-server: (watch-flake "watchexec -r -i content -i templates go run ./cmd/server")
 
+dev:
+    #!/usr/bin/env bash
+    set -euxo pipefail
+    tmp="$(mktemp -d -t website-XXXXXX)" || exit 1
+    echo using temp directory $tmp
+    trap "{ echo cleaning up $tmp; rm -rf \"$tmp\"; }" EXIT
+    go build -o $tmp ./cmd/dev ./cmd/build ./cmd/server
+    "${tmp}/dev" --temp-dir "${tmp}"
+
+watch-dev: (watch-flake "watchexec -r just dev")
+
 docker-stream system=(arch() + "-linux"):
     @nix build --print-out-paths .#docker-stream-{{ system }} | sh