-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (33 loc) · 1.45 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/make -f
SHELL:=/bin/bash
.PHONY: help init test test-only install-vendors update-vendors update-autoload
# Test that we have the necessary binaries available
define checkExecutables
$(foreach exec,$(1),\
$(if $(shell command -v $(exec)),,$(error Unable to find `$(exec)` in your PATH)))
endef
# Note that all comments with two hashes(#) will be used for output with `make help`. Alignment is tricky!
help:
$(call checkExecutables, fgrep)
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
##
## This is a list of available make commands that can be run.
##
init: ## Initializes the project and all dependencies
$(call checkExecutables, composer)
@make install-vendors
test: ## Runs all tests.
$(call checkExecutables, docker)
@vendor/bin/phpunit -d memory_limit=256M --configuration test/phpunit.xml
test-only: ## Only runs tests with 'test-only' group annotation
$(call checkExecutables, docker)
@vendor/bin/phpunit -d memory_limit=256M --configuration test/phpunit.xml --group test-only
install-vendors: ## Installs all the vendor lib dependencies.
$(call checkExecutables, docker)
@composer install
update-vendors: ## Updates all the vendor lib dependencies.
$(call checkExecutables, docker)
@composer update
update-autoload: ## Dump composer autoloader.
$(call checkExecutables, docker)
@composer dumpautoload