forked from CERTCC/SSVC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (47 loc) · 1.63 KB
/
Makefile
File metadata and controls
60 lines (47 loc) · 1.63 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
# Project-specific vars
MKDOCS_PORT=8765
DOCKER_DIR=docker
# Targets
.PHONY: all test docs docker_test clean help mdlint_fix up down regenerate_json
all: help
mdlint_fix:
@echo "Running markdownlint..."
markdownlint --config .markdownlint.yml --fix .
test:
@echo "Running tests locally..."
pytest -v src/test
docker_test:
@echo "Building the latest test image..."
pushd $(DOCKER_DIR) && docker-compose build test
@echo "Running tests in Docker..."
pushd $(DOCKER_DIR) && docker-compose run --rm test
docs:
@echo "Building and running docs in Docker..."
pushd $(DOCKER_DIR) && docker-compose up docs
up:
@echo "Starting Docker services..."
pushd $(DOCKER_DIR) && docker-compose up -d
down:
@echo "Stopping Docker services..."
pushd $(DOCKER_DIR) && docker-compose down
regenerate_json:
@echo "Regenerating JSON files..."
rm -rf data/json/decision_points
export PYTHONPATH=$(PWD)/src && ./src/ssvc/doctools.py --jsondir=./data/json/decision_points --overwrite
clean:
@echo "Cleaning up Docker resources..."
pushd $(DOCKER_DIR) && docker-compose down --rmi local || true
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " all - Display this help message"
@echo " mdlint_fix - Run markdownlint with fix"
@echo " test - Run tests locally"
@echo " docker_test - Run tests in Docker"
@echo " docs - Build and run documentation in Docker"
@echo " up - Start Docker services"
@echo " down - Stop Docker services"
@echo " regenerate_json - Regenerate JSON files from python modules"
@echo " clean - Clean up Docker resources"
@echo " help - Display this help message"