|
21 | 21 | # -- Makefile task config -------------- # |
22 | 22 | # .PHONY: ensures target used rather than matching file name |
23 | 23 | # https://makefiletutorial.com/#phony |
24 | | -.PHONY: all clean deps dist docs lint pre-commit-check repl test test-ci test-watch |
| 24 | +.PHONY: all clean deps dist docs lint pre-commit-check repl test test-ci test-watch |
25 | 25 | # -------------------------------------- # |
26 | 26 |
|
27 | 27 | # -- Makefile Variables ---------------- # |
28 | 28 | # run help if no target specified |
29 | 29 | .DEFAULT_GOAL := help |
30 | | - |
31 | 30 | # Column the target description is printed from |
32 | 31 | HELP-DESCRIPTION-SPACING := 24 |
33 | 32 |
|
| 33 | +SHELL := /usr/bin/zsh |
| 34 | + |
34 | 35 | # Tool variables |
35 | 36 | CLOJURE_TEST_RUNNER := clojure -M:test/env:test/run |
36 | 37 | CLOJURE_EXEC_TEST_RUNNER := clojure -X:test/env:test/run |
37 | 38 | DOCKER-BUILD-LOGFILE := docker-build-log-$(shell date +%y-%m-%d-%T).md |
38 | | -MEGALINTER_RUNNER := npx mega-linter-runner --flavor java --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --remove-container |
| 39 | +MEGALINTER_RUNNER := npx mega-linter-runner --flavor java --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --env "'VALIDATE_ALL_CODEBASE=true'" --remove-container |
39 | 40 | OUTDATED_FILE := outdated-$(shell date +%y-%m-%d-%T).md |
40 | 41 |
|
41 | 42 | # Makefile file and directory name wildcard |
42 | 43 | # EDN-FILES := $(wildcard *.edn) |
43 | | -# ------------------------------------ # |
44 | | - |
45 | | -# -- Help ------------------------------ # |
46 | | -# Source: https://nedbatchelder.com/blog/201804/makefile_help_target.html |
47 | | - |
48 | | -help: ## Describe available tasks in Makefile |
49 | | - @grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \ |
50 | | - sort | \ |
51 | | - awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-$(HELP-DESCRIPTION-SPACING)s\033[0m %s\n", $$1, $$2}' |
52 | 44 | # -------------------------------------- # |
53 | 45 |
|
54 | 46 | # -- Clojure Workflow ------------------ # |
@@ -110,15 +102,15 @@ test-watch-all: ## Run all tests when changes saved, regardless of failing test |
110 | 102 |
|
111 | 103 | # -- Build tasks ----------------------- # |
112 | 104 | build-config: ## Pretty print build configuration |
113 | | - $(info --------- View current build config ------) |
| 105 | + $(info -- View current build config -------------) |
114 | 106 | clojure -T:build/task config |
115 | 107 |
|
116 | 108 | build-jar: ## Build a jar archive of Clojure project |
117 | | - $(info --------- Build library jar --------------) |
| 109 | + $(info -- Build library jar ---------------------) |
118 | 110 | clojure -T:build/task jar |
119 | 111 |
|
120 | 112 | build-uberjar: ## Build a uberjar archive of Clojure project & Clojure runtime |
121 | | - $(info --------- Build service Uberjar ---------) |
| 113 | + $(info -- Build service Uberjar ----------------) |
122 | 114 | clojure -T:build/task uberjar |
123 | 115 |
|
124 | 116 | build-uberjar-echo: ## Build a uberjar archive of Clojure project & Clojure runtime |
@@ -155,9 +147,27 @@ lint-clean: ## Clean MegaLinter report information |
155 | 147 | $(info -- MegaLinter Clean Reports --------------) |
156 | 148 | - rm -rf ./megalinter-reports |
157 | 149 |
|
158 | | -megalinter-upgrade: ## Update MegaLinter config to latest version |
159 | | - $(info --------- MegaLinter Upgrade Config ---------) |
| 150 | +megalinter-upgrade: ## Upgrade MegaLinter config to latest version |
| 151 | + $(info -- MegaLinter Upgrade Config -------------) |
160 | 152 | npx mega-linter-runner@latest --upgrade |
| 153 | + |
| 154 | +dependencies-outdated: ## Report new versions of library dependencies and GitHub action |
| 155 | + $(info -- Search for outdated libraries ---------) |
| 156 | + - clojure -T:search/outdated > $(OUTDATED_FILE) |
| 157 | + |
| 158 | +dependencies-update: ## Update all library dependencies and GitHub action |
| 159 | + $(info -- Search for outdated libraries ---------) |
| 160 | + - clojure -T:update/dependency-versions > $(OUTDATED_FILE) |
| 161 | +# -------------------------------------- # |
| 162 | + |
| 163 | +# -- Version Control ------------------- # |
| 164 | +git-sr: ## status list of git repos under current directory |
| 165 | + $(info -- Multiple Git Repo Status --------------) |
| 166 | + mgitstatus -e --flatten |
| 167 | + |
| 168 | +git-status: ## status details of git repos under current directory |
| 169 | + $(info -- Multiple Git Status -------------------) |
| 170 | + mgitstatus |
161 | 171 | # -------------------------------------- # |
162 | 172 |
|
163 | 173 | # -- Docker Containers ----------------- # |
@@ -214,3 +224,13 @@ test-ci: deps ## Test runner for integration tests |
214 | 224 | .DELETE_ON_ERROR: |
215 | 225 | all: test-ci dist clean ## Call test-ci dist and clean targets, used for CI |
216 | 226 | # -------------------------------------- # |
| 227 | + |
| 228 | +# -- Help ------------------------------ # |
| 229 | +# Source: https://nedbatchelder.com/blog/201804/makefile_help_target.html |
| 230 | + |
| 231 | +help: ## Describe available tasks in Makefile |
| 232 | + @grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \ |
| 233 | + sort | \ |
| 234 | + awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-$(HELP-DESCRIPTION-SPACING)s\033[0m %s\n", $$1, $$2}' |
| 235 | +# -------------------------------------- # |
| 236 | + |
0 commit comments