-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (78 loc) · 2.52 KB
/
Makefile
File metadata and controls
89 lines (78 loc) · 2.52 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
84
85
86
87
88
89
# DevRun Makefile
.PHONY: install test lint clean examples help
# Default target
help:
@echo "DevRun - CLI Developer Tool"
@echo ""
@echo "Available commands:"
@echo " install Install DevRun globally (recommended)"
@echo " install-dev Install in development mode (for contributors)"
@echo " install-script Run installation script (cross-platform)"
@echo " test Run all tests"
@echo " lint Run code linting"
@echo " clean Clean build artifacts"
@echo " examples Run example projects"
@echo " help Show this help message"
# Install globally for system-wide access
install:
@echo "📦 Installing DevRun globally..."
pip install .
@echo "✅ DevRun installed globally! Try: devrun help"
@echo "💡 You can now use 'devrun start' in any project directory"
# Install in development mode (for contributors)
install-dev:
@echo "📦 Installing DevRun in development mode..."
pip install -e .
@echo "✅ DevRun installed in dev mode! Try: devrun help"
# Quick install using script (cross-platform)
install-script:
@echo "🚀 Running installation script..."
@if [ -f "scripts/install.sh" ]; then \
bash scripts/install.sh; \
else \
echo "❌ Installation script not found"; \
fi
# Run tests
test:
@echo "🧪 Running tests..."
python -m pytest tests/ -v
@echo "✅ Tests completed"
# Run linting (if flake8 is available)
lint:
@echo "🔍 Running code linting..."
@if command -v flake8 >/dev/null 2>&1; then \
flake8 devrun/ tests/ --max-line-length=100; \
else \
echo "⚠️ flake8 not found, skipping lint check"; \
echo " Install with: pip install flake8"; \
fi
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
@echo "✅ Cleanup completed"
# Run example projects
examples:
@echo "🚀 Testing DevRun with example projects..."
@echo ""
@echo "1. Node.js Example:"
@echo " cd examples/nodejs-example && devrun start"
@echo ""
@echo "2. Python Example:"
@echo " cd examples/python-example && devrun start"
@echo ""
@echo "💡 Run these commands manually to test DevRun"
# Build distribution packages
build:
@echo "📦 Building distribution packages..."
python setup.py sdist bdist_wheel
@echo "✅ Build completed - check dist/ directory"
# Install from PyPI (for testing)
install-pypi:
@echo "📦 Installing DevRun from PyPI..."
pip install devrun
@echo "✅ DevRun installed from PyPI"