From f2260006bd370584434b935f90e85e3dcee776c2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 5 Jan 2022 10:46:19 -0500 Subject: [PATCH] build: 'make help' works nicer on Mac sed on Mac doesn't seem to understand \n. While I was in here, I fixed some typos. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4340d00..7d2efcf 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ BLACK_OPTS = --exclude templates ${SRC_DIRS} ###### Development -docs: ## Build html documentation +docs: ## Build HTML documentation $(MAKE) -C docs compile-requirements: ## Compile requirements files @@ -18,7 +18,7 @@ upgrade-requirements: ## Upgrade requirements files pip-compile --upgrade requirements/dev.in pip-compile --upgrade requirements/docs.in -build-pythonpackage: build-pythonpackage-tutor ## Build python packages ready to upload to pypi +build-pythonpackage: build-pythonpackage-tutor ## Build Python packages ready to upload to pypi build-pythonpackage-tutor: ## Build the "tutor" python package for upload to pypi python setup.py sdist @@ -26,7 +26,7 @@ build-pythonpackage-tutor: ## Build the "tutor" python package for upload to pyp push-pythonpackage: ## Push python package to pypi twine upload --skip-existing dist/tutor-$(shell make version).tar.gz -test: test-lint test-unit test-types test-format test-pythonpackage ## Run all tests by decreasing order or priority +test: test-lint test-unit test-types test-format test-pythonpackage ## Run all tests by decreasing order of priority test-format: ## Run code formatting tests black --check --diff $(BLACK_OPTS) @@ -50,7 +50,7 @@ bootstrap-dev: ## Install dev requirements pip install . pip install -r requirements/dev.txt -bootstrap-dev-plugins: bootstrap-dev ## Install dev requirement and all supported plugins +bootstrap-dev-plugins: bootstrap-dev ## Install dev requirements and all supported plugins pip install -r requirements/plugins.txt ###### Code coverage @@ -125,5 +125,5 @@ version: ## Print the current tutor version ESCAPE =  help: ## Print this help @grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \ - | sed 's/######* \(.*\)/\n $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' \ + | sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \ | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'