-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (37 loc) · 1.46 KB
/
Makefile
File metadata and controls
54 lines (37 loc) · 1.46 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
SHELL := /bin/bash
# https://www.gushiciku.cn/pl/p6TH
.SHELLFLAGS := -euo pipefail -c
.ONESHELL:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ROOT := $(shell pwd)
.DEFAULT_GOAL = help
##@ Bootstrap
.PHONY: repo-init init
repo-init: ## Install pre-commit in repo
pre-commit install -t pre-commit -t commit-msg
init: repo-init ## All init steps at once
##@ Checks
.PHONY: check
check: ## Run pre-commit against all files
pre-commit run --all-files
##@ Tests
.PONY: test
test: ## Run all tests
$(MAKE) -C ${ROOT}/tests/ jammy64 clean
##@ Miscellaneous
.PHONY: secrets-baseline-create secrets-baseline-audit secrets-update tasks
clean: ## Clean repo
# Delete caches, build artifacts, etc.
secrets-baseline-create: ## Create/update .secrets.baseline file
detect-secrets scan --baseline .secrets.baseline
secrets-baseline-audit: ## Check updated .secrets.baseline file
detect-secrets audit .secrets.baseline
git commit .secrets.baseline --no-verify -m "build(security): update secrets.baseline"
secrets-update: secrets-baseline-create secrets-baseline-audit ## Update secrets baseline file
tasks: ## List playbook tasks
ansible-playbook playbook.yml --list-tasks
##@ Helpers
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-24s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)