Last active
July 22, 2022 21:10
-
-
Save jeslopcru/d5a92792138be00aebc6d99cb40ce980 to your computer and use it in GitHub Desktop.
simple makefile for katas
This file contains 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: ## Print this help. | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | |
build: ## Build a dockerimage | |
docker build -t my-php . | |
install: ## install dependencies with "composer install" | |
docker run --rm -it -v $(shell pwd):/opt/project my-php composer install | |
composer: ## run a composer command with an argument arg | |
docker run --rm -it -v $(shell pwd):/opt/project my-php composer $(arg) | |
phpunit: ## run phpunit test | |
docker run --rm -it -v $(shell pwd):/opt/project my-php ./vendor/bin/phpunit | |
shell: ## shell inside docker container | |
docker run --rm -it -v $(shell pwd):/opt/project my-php /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment