-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
duild: | ||
.PHONY: test | ||
.DEFAULT_GOAL := help | ||
|
||
help: ## Output usage documentation | ||
@echo "Usage: make COMMAND [args]\n\nCommands:\n" | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
duild: ## Build necessary image for building packages | ||
cd image && IMAGE_NAME=php-fpm-7.1-alpine ../hooks/build | ||
|
||
.PHONY: test | ||
test: test-static-analysis test-environment | ||
test: lint env-validate ## Run all tests | ||
|
||
test-environment: duild | ||
env-validate: duild ## Testing requirements for environment | ||
cd test && ./run.sh | ||
|
||
test-static-analysis: | ||
shellcheck --exclude=SC2148 Makefile | ||
lint: ## Run static analysis | ||
shellcheck --exclude=SC2148,SC2046 Makefile | ||
shellcheck hooks/* | ||
shellcheck test/*.sh | ||
shellcheck test/**/*.sh |