-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathJustfile
More file actions
41 lines (31 loc) · 1002 Bytes
/
Copy pathJustfile
File metadata and controls
41 lines (31 loc) · 1002 Bytes
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
project_root := justfile_directory()
default:
@just --list
check:
cd ui && bun run check
lint:
cd ui && bun run lint
test:
cd ui && bun run test
server-test:
cd server && go test ./...
check-demos:
./scripts/check-demo-patches.sh
build binary="patchies-server":
cd ui && bun install --frozen-lockfile && bun run build
rsync -a --delete --exclude='.gitignore' --exclude='.gitkeep' ui/build/ server/static/
cd server && go run ./cmd/pack-static -source static -destination static.zip
cd server && go build -o "../{{binary}}" .
dev:
#!/usr/bin/env bash
set -euo pipefail
(cd ui && bun run dev -- --host 127.0.0.1 --logLevel warn) &
vite_pid=$!
trap 'kill "$vite_pid" 2>/dev/null || true' EXIT INT TERM
export PATCHIES_DATA_DIR="{{project_root}}/server/pb_data"
cd server
go tool air -c .air.toml
restore data_db:
./scripts/restore-data-db.sh "{{data_db}}"
docker-build image="patchies":
docker build -t {{image}} .