chore(meta): update Makefile and gitignore for Godot client CI

- Implement lint-client, build-client, test-client Make targets
- Add GODOT variable for binary detection
- Gitignore .godot cache, export artifacts, test reports
- Clean target handles Godot artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 16:52:45 +01:00
co-authored by Claude Opus 4.6
parent 603c24e177
commit b92b99f744
2 changed files with 18 additions and 12 deletions
+6
View File
@@ -1,6 +1,12 @@
# Build and cache
.cache/
# Godot
client/.godot/
client/export/
client/reports/
client/*.import
# Database journal files (transient, not the DB itself)
db/commonwealth.db-wal
db/commonwealth.db-shm
+12 -12
View File
@@ -1,3 +1,5 @@
GODOT := $(shell command -v godot4 2>/dev/null || command -v godot 2>/dev/null)
.PHONY: help setup build client server test lint ci ci-client ci-server clean \
decisions-sync decisions-coverage decisions-active decisions-orphan
@@ -47,8 +49,8 @@ build-server:
cd server && cargo build
build-client:
@echo "Client build: Godot exports are configured via the editor."
@echo "Use 'make client' to run the client directly."
@test -n "$(GODOT)" || { echo "Godot not found. Run 'make setup' first."; exit 1; }
$(GODOT) --headless --path client --quit
# --- Run ---
@@ -56,13 +58,8 @@ server:
cd server && cargo run
client:
@if command -v godot4 >/dev/null 2>&1; then \
godot4 --path client; \
elif command -v godot >/dev/null 2>&1; then \
godot --path client; \
else \
echo "Godot not found. Run 'make setup' first."; exit 1; \
fi
@test -n "$(GODOT)" || { echo "Godot not found. Run 'make setup' first."; exit 1; }
$(GODOT) --path client
# --- Test ---
@@ -72,8 +69,8 @@ test-server:
cd server && cargo test
test-client:
@echo "Client tests run via gdUnit4 inside Godot."
@echo "TODO: headless test runner integration"
@test -n "$(GODOT)" || { echo "Godot not found. Run 'make setup' first."; exit 1; }
$(GODOT) --headless --path client -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -a res://tests/
# --- Lint ---
@@ -84,7 +81,9 @@ lint-server:
cd server && cargo fmt --check
lint-client:
@echo "Client lint: TODO — gdlint / gdformat integration"
@test -n "$(GODOT)" || { echo "Godot not found. Run 'make setup' first."; exit 1; }
@echo "Checking GDScript for errors..."
@$(GODOT) --headless --path client --quit 2>&1 | grep -i "SCRIPT ERROR" && { echo "GDScript errors found"; exit 1; } || echo "No script errors found"
# --- CI (run locally) ---
@@ -113,4 +112,5 @@ decisions-orphan:
clean:
cd server && cargo clean || true
rm -rf .cache/*
rm -rf client/.godot client/reports
@echo "Clean complete."