88# https://makefiletutorial.com/#phony
99.PHONY : all clean docs lint pre-commit-check test
1010
11-
1211# ------- Makefile Variables --------- #
13-
1412# run help if no target specified
1513.DEFAULT_GOAL := help
14+ SHELL := /usr/bin/zsh
1615
1716# Column the target description is printed from
1817HELP-DESCRIPTION-SPACING := 24
1918
2019# Tool Commands
21- MEGALINTER_RUNNER = npx mega-linter-runner --flavor documentation --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --remove-container
22- MKDOCS_SERVE = mkdocs serve --dev-addr localhost:7777
20+ MEGALINTER_RUNNER : = npx mega-linter-runner --flavor documentation --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --env "'VALIDATE_ALL_CODEBASE=true'" --remove-container
21+ MKDOCS_SERVER : = mkdocs serve --dev-addr localhost:7777
2322
2423# Makefile file and directory name wildcard
2524EDN-FILES := $(wildcard * .edn)
26-
2725# ------------------------------------ #
2826
29-
3027# ------ Quality Checks ------------ #
31-
3228pre-commit-check : lint
3329
3430lint : # # Run MegaLinter with custom configuration (node.js required)
@@ -39,38 +35,38 @@ lint-fix: ## Run MegaLinter with custom configuration (node.js required)
3935 $(info --------- MegaLinter Runner ---------)
4036 $(MEGALINTER_RUNNER ) --fix
4137
42-
4338lint-clean : # # Clean MegaLinter report information
4439 $(info --------- MegaLinter Clean Reports ---------)
4540 - rm -rf ./megalinter-reports
4641
42+ megalinter-upgrade : # # Upgrade MegaLinter config to latest version
43+ $(info --------- MegaLinter Upgrade Config ---------)
44+ npx mega-linter-runner@latest --upgrade
4745# ------------------------------------ #
4846
49-
5047# --- Documentation Generation ------ #
51-
52- docs : # # Build and run mkdocs in local server
48+ python-venv : # # Enable Python Virtual Environment for MkDocs
5349 $(info --------- Mkdocs Local Server ---------)
54- $( MKDOCS_SERVE )
50+ source ~ /.local/venv/bin/activate
5551
56- docs-changed : # # Build only changed files and run mkdocs in local server
52+ docs : # # Build and run mkdocs in local server (python venv)
5753 $(info --------- Mkdocs Local Server ---------)
58- $( MKDOCS_SERVE ) --dirtyreload
54+ source ~ /.local/venv/bin/activate && $( MKDOCS_SERVER )
5955
60- docs-build : # # Build mkdocs
56+ docs-changed : # # Build only changed files and run mkdocs in local server (python venv)
6157 $(info --------- Mkdocs Local Server ---------)
62- mkdocs build
58+ source ~ /.local/venv/bin/activate && $( MKDOCS_SERVER ) --dirtyreload
6359
60+ docs-build : # # Build mkdocs (python venv)
61+ $(info --------- Mkdocs Local Server ---------)
62+ source ~ /.local/venv/bin/activate && mkdocs build
6463# ------------------------------------ #
6564
66-
6765# ------------ Help ------------------ #
68-
6966# Source: https://nedbatchelder.com/blog/201804/makefile_help_target.html
7067
7168help : # # Describe available tasks in Makefile
7269 @grep ' ^[a-zA-Z]' $(MAKEFILE_LIST ) | \
7370 sort | \
7471 awk -F ' :.*?## ' ' NF==2 {printf "\033[36m %-$(HELP-DESCRIPTION-SPACING)s\033[0m %s\n", $$1, $$2}'
75-
7672# ------------------------------------ #
0 commit comments