- Exercise number (UF#): optional field on exercises, displayed in cards, training, and sets - Import training plan numbers via migration 005 (UPDATE by name) - Exercise images: JPG upload with multi-image support per exercise (migration 006) - Version endpoint (GET /api/v1/version) with ldflags injection in Makefile and Dockerfile - Version displayed on settings page - Session resume: GET /api/v1/sessions/active endpoint, auto-resume on training page load - Block new session while one is active (409 Conflict) - e1RM sparkline chart per exercise during training (Epley formula) - Fix CORS: add X-User-ID to allowed headers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
692 B
Makefile
Executable File
21 lines
692 B
Makefile
Executable File
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
|
|
|
.PHONY: dev-backend dev-frontend build clean
|
|
|
|
dev-backend:
|
|
cd backend && GO111MODULE=on go run ./cmd/server
|
|
|
|
dev-frontend:
|
|
cd frontend && pnpm dev
|
|
|
|
build:
|
|
cd frontend && pnpm install && pnpm build
|
|
find backend/static -not -name 'embed.go' -not -name '.gitkeep' -not -path backend/static -delete
|
|
cp -r frontend/dist/* backend/static/
|
|
cd backend && GO111MODULE=on CGO_ENABLED=1 go build -ldflags "-X main.Version=$(VERSION)" -o ../krafttrainer ./cmd/server
|
|
|
|
clean:
|
|
rm -f krafttrainer
|
|
rm -rf frontend/dist
|
|
find backend/static -not -name '.gitkeep' -not -path backend/static -delete 2>/dev/null || true
|