-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (52 loc) · 1.9 KB
/
Makefile
File metadata and controls
74 lines (52 loc) · 1.9 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
74
# Variables
DEVRAIL_IMAGE ?= ghcr.io/devrail-dev/dev-toolchain:v1
DOCKER_RUN ?= docker run --rm -v "$$(pwd):/workspace" -w /workspace $(DEVRAIL_IMAGE)
HUGO_VERSION ?= latest
.DEFAULT_GOAL := help
# .PHONY declarations
.PHONY: help build serve lint format fix test security scan docs check install-hooks
.PHONY: _lint _format _fix _test _security _scan _docs _check
# Public targets
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: ## Build the Hugo site
hugo --minify
serve: ## Start local Hugo development server
hugo server --buildDrafts --buildFuture
lint: ## Run all linters
$(DOCKER_RUN) make _lint
fix: ## Auto-fix formatting issues in-place
$(DOCKER_RUN) make _fix
format: ## Run all formatters
$(DOCKER_RUN) make _format
test: ## Run all tests
$(DOCKER_RUN) make _test
security: ## Run security scanners
$(DOCKER_RUN) make _security
scan: ## Run full scan (lint + security)
$(DOCKER_RUN) make _scan
docs: ## Generate documentation
$(DOCKER_RUN) make _docs
check: ## Run all checks (lint, format, test, security, docs)
$(DOCKER_RUN) make _check
install-hooks: ## Install pre-commit hooks
pre-commit install
pre-commit install --hook-type pre-push
# Internal targets
_lint:
@echo "lint: no language-specific linters for documentation site"
_format:
@echo "format: no language-specific formatters for documentation site"
_fix:
@echo "fix: no language-specific formatters for documentation site"
_test:
@echo "test: no language-specific tests for documentation site"
_security:
@echo "security: no language-specific security scanners for documentation site"
_scan:
@echo "scan: universal scanners not yet configured"
_docs:
@echo "docs: documentation is generated by Hugo build target"
_check: _lint _format _test _security _scan _docs
@echo "check: all checks complete"