-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (51 loc) · 1.96 KB
/
Makefile
File metadata and controls
60 lines (51 loc) · 1.96 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
.PHONY: help validate-links fix-links build-validator build-fixer clean test convert-framework-mappings
# Default target
help:
@echo "GraphGRC Makefile"
@echo ""
@echo "Available targets:"
@echo " validate-links - Validate all markdown links in docs/"
@echo " fix-links - Automatically fix broken markdown links"
@echo " build-validator - Build the link validator binary"
@echo " build-fixer - Build the link fixer binary"
@echo " convert-framework-mappings - Convert framework mappings from bullet to annotation format"
@echo " clean - Remove build artifacts"
@echo " test - Run all tests"
@echo " generate - Generate all documentation"
# Validate all markdown links
validate-links: build-validator
@echo "Validating markdown links..."
@./bin/validate-links docs/
# Fix broken markdown links
fix-links: build-fixer
@echo "Fixing markdown links..."
@./bin/fix-links docs/
# Build the link validator
build-validator:
@mkdir -p bin
@cd src/cmd/validate-links && go build -o ../../../bin/validate-links .
@echo "✓ Link validator built: bin/validate-links"
# Build the link fixer
build-fixer:
@mkdir -p bin
@cd src/cmd/fix-links && go build -o ../../../bin/fix-links .
@echo "✓ Link fixer built: bin/fix-links"
# Clean build artifacts
clean:
@rm -rf bin/
@find docs -name "*.tmp" -type f -delete
@echo "✓ Cleaned build artifacts and temporary files"
# Run tests
test:
@cd src && go test ./...
# Generate all documentation
generate:
@cd src && go run main.go
@echo "✓ Documentation generated"
# Convert framework mappings from bullet to annotation format
convert-framework-mappings:
@mkdir -p bin
@cd src/cmd/convert-framework-mappings && go build -o ../../../bin/convert-framework-mappings .
@echo "✓ Converter built: bin/convert-framework-mappings"
@./bin/convert-framework-mappings
@echo "✓ Framework mappings converted"