-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 822 Bytes
/
Makefile
File metadata and controls
30 lines (24 loc) · 822 Bytes
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
.PHONY: test help setup docs
VENV := .venv
PYTHON := $(VENV)/bin/python3
PIP := $(VENV)/bin/pip
help:
@echo "ClickFix Attack Detection Patterns"
@echo ""
@echo "Targets:"
@echo " make setup - create venv, install dependencies and git hooks"
@echo " make test - run pattern tests"
@echo " make docs - generate documentation"
$(VENV)/bin/activate:
/opt/homebrew/bin/python3.13 -m venv $(VENV)
setup: $(VENV)/bin/activate
$(PIP) install -r requirements.txt
@echo "Installing git pre-commit hook..."
@mkdir -p .git/hooks
@printf '#!/bin/sh\nmake test\n' > .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Done! Pre-commit hook will run 'make test' before each commit."
test: $(VENV)/bin/activate
$(PYTHON) scripts/test/run.py
docs: $(VENV)/bin/activate
$(PYTHON) scripts/docs/generate.py