Created
February 27, 2021 20:43
-
-
Save nickjj/a6e4f33b4588a6e231a8b9374ce6fe58 to your computer and use it in GitHub Desktop.
This throw away Makefile was covered on video at: https://nickjanetakis.com/blog/replacing-make-with-a-shell-script-for-running-your-projects-tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: help | |
help: | |
@printf "%s\n" "Useful targets:" | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m make %-15s\033[0m %s\n", $$1, $$2}' | |
.PHONY: db-reset | |
db-reset: ## Reset the database | |
docker-compose exec web flask db reset --with-testdb | |
.PHONY: routes | |
routes: ## List available routes | |
docker-compose exec web flask routes | |
.PHONY: flask | |
flask: ## Execute Flask command | |
docker-compose exec web flask $(ARGS) | |
whatisphony: ## This won't print as is | |
@echo "This will not print because a file named 'whatisphony' exists on disk" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment