fix: improve Makefile robustness and update CONTRIBUTING docs

- Add exit 1 to test-backend when pytest not installed
- Add exit 1 to test-frontend when no test script configured
- Add venv dependency to db-init target
- Document Makefile usage in CONTRIBUTING.md
This commit is contained in:
tomasmach
2026-01-30 00:51:41 +01:00
parent 76bc070f5b
commit 9d98e1e768
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -32,6 +32,10 @@ Thank you for your interest in contributing to Voicebox! This document provides
### Development Setup
**Using the Makefile (recommended for macOS/Linux):** Run `make setup` to install all dependencies, then `make dev` to start development servers. See `make help` for all available commands.
**Manual setup (required for Windows):**
1. **Fork and clone the repository**
```bash
git clone https://github.com/YOUR_USERNAME/voicebox.git
+3 -1
View File
@@ -126,7 +126,7 @@ build-web: ## Build web app
.PHONY: db-init db-reset generate-api
db-init: ## Initialize SQLite database
db-init: $(VENV)/bin/activate ## Initialize SQLite database
@echo -e "$(BLUE)Initializing database...$(NC)"
cd $(BACKEND_DIR) && $(PYTHON_VENV) -c "from database import init_db; init_db()"
@echo -e "$(GREEN)✓ Database created at $(BACKEND_DIR)/data/voicebox.db$(NC)"
@@ -180,6 +180,7 @@ test-backend: ## Run Python backend tests (requires pytest)
cd $(BACKEND_DIR) && $(VENV_BIN)/pytest -v; \
else \
echo -e "$(YELLOW)pytest not installed. Run: $(PIP) install pytest$(NC)"; \
exit 1; \
fi
test-frontend: ## Run frontend tests (requires test script in package.json)
@@ -188,6 +189,7 @@ test-frontend: ## Run frontend tests (requires test script in package.json)
bun run test; \
else \
echo -e "$(YELLOW)No test script configured$(NC)"; \
exit 1; \
fi
# =============================================================================