@@ -18,13 +18,16 @@ UV ?= uv $(UV_OPTS)
1818.PHONY : clean run-dev-frontend run-dev-server production develop destroy
1919.PHONY : docker-up docker-down docker-logs docker-shell-api docker-shell-bot docker-ps
2020.PHONY : docker-restart docker-rebuild infra-up infra-down
21+ .PHONY : worktree worktree-prune
2122
2223help : # # Display this help text for Makefile
2324 @awk ' BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST )
2425
26+ # #@ Setup & Installation
27+
2528upgrade : # # Upgrade all dependencies to the latest stable versions
2629 @echo " => Upgrading prek"
27- @ (UV_RUN_BIN ) run prek autoupdate
30+ @$( UV ) run prek autoupdate
2831 @if [ " $( USING_UV) " ]; then $(UV ) lock --upgrade
2932 @echo " Dependencies Updated"
3033
@@ -39,10 +42,11 @@ install-uv: ## Install latest version of UV
3942
4043install-prek : # # Install prek and install hooks
4144 @echo " Installing prek hooks"
42- @ (UV_RUN_BIN) run prek install
43- @ (UV_RUN_BIN) run prek install --hook-type commit-msg
45+ @$(UV ) run prek install
46+ @$(UV ) run prek install --hook-type commit-msg
47+ @$(UV ) run prek install --hook-type pre-push
4448 @echo " => prek hooks installed"
45- @ (UV_RUN_BIN ) run prek autoupdate
49+ @$( UV ) run prek autoupdate
4650 @echo " prek installed"
4751
4852.PHONY : install-frontend
@@ -90,6 +94,8 @@ refresh-container: clean-container up-container load-container ## Refresh the By
9094# Tests, Linting, Coverage
9195# =============================================================================
9296
97+ # #@ Code Quality
98+
9399lint : # # Runs prek hooks; includes ruff linting, codespell, black
94100 @$(UV ) run --no-sync prek run --all-files
95101
@@ -126,6 +132,9 @@ ci: check-all ## Run all checks for CI
126132# =============================================================================
127133# Docs
128134# =============================================================================
135+
136+ # #@ Documentation
137+
129138docs-clean : # # Dump the existing built docs
130139 @echo " => Cleaning documentation build assets"
131140 @rm -rf docs/_build
@@ -142,6 +151,9 @@ docs: docs-clean ## Dump the existing built docs and rebuild them
142151# =============================================================================
143152# Database
144153# =============================================================================
154+
155+ # #@ Database Operations
156+
145157migrations : # # Generate database migrations
146158 @echo " ATTENTION: This operation will create a new database migration for any defined models changes."
147159 @while [ -z " $$ MIGRATION_MESSAGE" ]; do read -r -p " Migration message: " MIGRATION_MESSAGE; done ;
@@ -160,6 +172,8 @@ db: ## Run the database
160172# Docker Compose Commands
161173# =============================================================================
162174
175+ # #@ Docker Development
176+
163177.PHONY : docker-up
164178docker-up : # # Start all services (PostgreSQL, API, Bot) with Docker Compose
165179 @echo " => Starting all services with Docker Compose"
@@ -242,6 +256,24 @@ infra-down: ## Stop PostgreSQL infrastructure
242256 @docker compose -f docker-compose.infra.yml down
243257 @echo " => PostgreSQL stopped"
244258
259+ # =============================================================================
260+ # Git Worktree Management
261+ # =============================================================================
262+
263+ # #@ Git Worktrees
264+
265+ worktree : # # Create a new git worktree for feature branch
266+ @echo " => Creating git worktree"
267+ @read -p " Feature name: " name; \
268+ git checkout main && git pull && \
269+ git worktree add worktrees/$$ name -b feature/$$ name && \
270+ echo " => Worktree created at worktrees/$$ name on branch feature/$$ name"
271+
272+ worktree-prune : # # Clean up stale git worktrees
273+ @echo " => Pruning stale git worktrees"
274+ @git worktree prune -v
275+ @echo " => Stale worktrees pruned"
276+
245277# =============================================================================
246278# Main
247279# =============================================================================
0 commit comments