-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (57 loc) · 2.33 KB
/
Makefile
File metadata and controls
73 lines (57 loc) · 2.33 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
.PHONY: setup run run-web lint format format-check test check-all install install-gui clean build-macos build-windows build-linux
# ── First-time setup ──────────────────────────────────────────────────────────
# Creates a virtual environment and installs all dependencies in one command.
# Run this once after cloning the repository.
setup:
python -m venv .venv
.venv/bin/pip install --upgrade pip --quiet
.venv/bin/pip install -e ".[dev,web,gui]"
@echo ""
@echo "✅ Setup complete!"
@echo " Launch the desktop app : make run"
@echo " Launch the web UI : make run-web"
@echo " Run tests : make test"
# ── Run ───────────────────────────────────────────────────────────────────────
# Launch the native desktop GUI
run:
.venv/bin/docfinder-gui
# Launch the web interface (opens in browser at http://127.0.0.1:8000)
run-web:
.venv/bin/docfinder web
# ── Install (legacy targets, prefer 'make setup') ─────────────────────────────
# Install dependencies (no GUI)
install:
.venv/bin/pip install -e ".[dev,web]"
# Install with GUI support
install-gui:
.venv/bin/pip install -e ".[dev,web,gui]"
# Run linter
lint:
.venv/bin/ruff check src/ tests/
# Check code formatting
format-check:
.venv/bin/ruff format --check src/ tests/
# Auto-format code
format:
.venv/bin/ruff format src/ tests/
# Run tests
test:
.venv/bin/pytest -v --cov=docfinder --cov-report=term
# Run all CI checks locally
check-all: lint format-check test
@echo "✅ All checks passed! Ready to push."
# Build macOS app (DMG)
build-macos:
./scripts/build-macos.sh
# Build Windows app (run on Windows)
build-windows:
powershell -ExecutionPolicy Bypass -File scripts/build-windows.ps1
# Build Linux app (AppImage)
build-linux:
./scripts/build-linux.sh
# Clean build artifacts
clean:
rm -rf build/ dist/ *.egg-info htmlcov/ .coverage coverage.xml .pytest_cache/
rm -rf resources/DocFinder.iconset resources/DocFinder.icns resources/DocFinder.ico
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete