Skip to content

Commit 393944f

Browse files
authored
Merge pull request #3 from rsned/fix/makefile-auto-import
fix: auto-run Godot import cache before first launch
2 parents 11d5890 + 58b9032 commit 393944f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ ifeq ($(GODOT),)
99
$(error Godot not found. Install it or set GODOT=/path/to/godot)
1010
endif
1111

12-
.PHONY: run test validate coverage help
12+
.PHONY: run test validate coverage help import
1313

1414
help: ## Show this help
1515
@grep -E '^[a-z][a-z_-]+:.*## ' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " make %-12s %s\n", $$1, $$2}'
1616

17-
run: ## Launch the game client (logs to output.log)
17+
import: ## Build .godot/ import cache (class_name registration, resource import)
18+
@if [ ! -d .godot ]; then \
19+
echo "Building import cache..."; \
20+
$(GODOT) --headless --import; \
21+
fi
22+
23+
run: import ## Launch the game client (logs to output.log)
1824
$(GODOT) --path . 2>&1 | tee output.log
1925

2026
test: ## Run all tests (unit + integration)

0 commit comments

Comments
 (0)