forked from openshift/enhancements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (39 loc) · 1.95 KB
/
Makefile
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
##@ General
RUNTIME ?= podman # container command for linter and report-upload
PULL_BASE_SHA ?= origin/master # Allow the template check base ref to be overriden
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " make \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^[A-Z_-]+.*=/ { varend=index($$0, "?") - 1; if ( varend > 0 ) { helpstart=index($$0, "#") + 1; printf " var \033[36m%-15s\033[0m %s\n", substr($$0, 0, varend), substr($$0, helpstart) } } /^##@/ { printf "\n \033[1m%s\033[0m\n", substr($$0, 5) } END { printf "\n" }' $(MAKEFILE_LIST)
##@ Linter
.PHONY: image
image: ## Build local container image
$(RUNTIME) image build -f ./hack/Dockerfile.markdownlint --tag enhancements-markdownlint:latest
.PHONY: image-clean
image-clean: ## Remove locally cached image
$(RUNTIME) image rm enhancements-markdownlint:latest
lint: image ## run the markdown linter
$(RUNTIME) run \
--rm=true \
--env RUN_LOCAL=true \
--env VALIDATE_MARKDOWN=true \
--env PULL_BASE_SHA=$(PULL_BASE_SHA) \
-v $$(pwd):/workdir:Z \
enhancements-markdownlint:latest
##@ This Week in Enhancements
ANNUAL_SUMMARY_FILE=this-week/$(shell expr $$(date +%Y) - 1).md
.PHONY: report report-gen
report: closed-stale report-gen lint ## run weekly newsletter report tool
closed-stale: ## Leave comments on enhancements closed by the lifecycle bot
(cd tools && go run ./main.go closed-stale)
show-stale: ## Show the status of enhancements closed by the lifecycle bot
(cd tools && go run ./main.go closed-stale --dry-run)
report-gen:
./hack/this-week.sh
.PHONY: annual-summary annual-summary-gen
annual-summary: annual-summary-gen lint ## run annual report tool
annual-summary-gen:
(cd ./tools; go run ./main.go annual-summary > ../$(ANNUAL_SUMMARY_FILE))
HACKMD_IMAGE=enhancements-hackmd-cli:latest # hackmd-cli image
.PHONY: report-image
report-image:
$(RUNTIME) build -f ./hack/Dockerfile.hackmd-cli --tag $(HACKMD_IMAGE)