-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (74 loc) · 2.66 KB
/
Makefile
File metadata and controls
83 lines (74 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Titan CLI - Makefile
# Development commands for initial setup
.PHONY: help install dev-install test clean docs-serve docs-build docs-deploy
# Default target
help:
@echo "Titan CLI - Available commands:"
@echo ""
@echo "For Contributors:"
@echo " make dev-install Setup development environment (creates titan-dev)"
@echo " make test Run all tests"
@echo ""
@echo "For Users:"
@echo " make install Install production version (NOT recommended - use pipx)"
@echo ""
@echo "Documentation:"
@echo " make docs-serve Serve docs locally at http://localhost:8000"
@echo " make docs-build Build docs to site/"
@echo " make docs-deploy Deploy docs to GitHub Pages"
@echo ""
@echo "Cleanup:"
@echo " make clean Remove basic build artifacts"
@echo ""
@echo "Note: Contributors should use 'make dev-install' to get titan-dev command."
@echo " End users should use 'pipx install titan-cli' instead."
# Setup development environment (CONTRIBUTORS ONLY)
dev-install:
@echo "🔧 Setting up development environment..."
@echo ""
@echo "1️⃣ Installing dependencies with Poetry..."
poetry install
@echo ""
@echo "2️⃣ Creating titan-dev launcher..."
@mkdir -p ~/.local/bin
@echo '#!/bin/bash' > ~/.local/bin/titan-dev
@echo '# titan-dev - Development version of Titan CLI' >> ~/.local/bin/titan-dev
@echo 'export TITAN_ENV=development' >> ~/.local/bin/titan-dev
@echo 'exec "$(shell pwd)/.venv/bin/titan" "$$@"' >> ~/.local/bin/titan-dev
@chmod +x ~/.local/bin/titan-dev
@echo ""
@echo "✅ Development environment ready!"
@echo ""
@echo "Usage:"
@echo " titan-dev Run development version from local codebase"
@echo " poetry run titan Alternative way to run"
@echo ""
@echo "Verify installation:"
@~/.local/bin/titan-dev --version || echo "⚠️ Make sure ~/.local/bin is in your PATH"
# Install production version (NOT recommended - use pipx instead)
install:
@echo "⚠️ This installs from local source, not PyPI."
@echo "⚠️ For production use: pipx install titan-cli"
@echo ""
@echo "📦 Installing from local source..."
pipx install .
@echo "✅ Installed. Run 'titan' to verify."
# Run tests
test:
@echo "🧪 Running all tests..."
poetry run pytest
# Docs commands
docs-serve:
@echo "📖 Serving docs at http://localhost:8000 ..."
poetry run mkdocs serve
docs-build:
@echo "📖 Building docs to site/ ..."
poetry run mkdocs build
docs-deploy:
@echo "🚀 Deploying docs to GitHub Pages ..."
poetry run mkdocs gh-deploy
# Clean basic build artifacts
clean:
@echo "🧹 Cleaning basic artifacts..."
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
@echo "✅ Cleaned"