-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
32 lines (22 loc) · 1.12 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
.PHONY: help install certs certs-force users run test clean clean-all setup
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
install: ## Install dependencies (creates .venv via uv)
uv sync
certs: ## Generate self-signed IdP certificate and key
uv run python -c "from saml import generate_self_signed_cert; generate_self_signed_cert()"
certs-force: ## Regenerate certs (removes existing ones first)
rm -f certs/idp_cert.pem certs/idp_key.pem
$(MAKE) certs
users: ## Add sample users (alice, bob)
uv run python add_user.py alice@example.com password123 "Alice Smith" "admin,user"
uv run python add_user.py bob@example.com password456 "Bob Jones" "user"
run: ## Run the IdP server
uv run python app.py
test: ## Run the pytest test suite
uv run pytest tests/
clean: ## Remove generated certs and user data
rm -f certs/idp_cert.pem certs/idp_key.pem users.csv
clean-all: clean ## Also remove virtualenv
rm -rf .venv
setup: install certs users ## One-shot setup: install deps, generate certs, add sample users