1
0
mirror of https://github.com/danog/process.git synced 2024-11-29 20:29:16 +01:00

Add Makefile and update git files

This commit is contained in:
Aaron Piotrowski 2017-11-24 18:47:59 -06:00
parent c47b61d7e7
commit 6b991c898b
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
3 changed files with 58 additions and 7 deletions

8
.gitattributes vendored Normal file
View File

@ -0,0 +1,8 @@
examples export-ignore
test export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs.dist export-ignore
.travis.yml export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore

12
.gitignore vendored
View File

@ -1,7 +1,5 @@
/.idea .php_cs.cache
/coverage build
/build composer.lock
/composer.lock phpunit.xml
/phpunit.xml vendor
/vendor
/.php_cs.cache

45
Makefile Normal file
View File

@ -0,0 +1,45 @@
PHP_BIN := php
COMPOSER_BIN := composer
COVERAGE = coverage
SRCS = lib test
find_php_files = $(shell find $(1) -type f -name "*.php")
src = $(foreach d,$(SRCS),$(call find_php_files,$(d)))
.PHONY: test
test: setup phpunit code-style
.PHONY: clean
clean: clean-coverage clean-vendor
.PHONY: clean-coverage
clean-coverage:
test ! -e coverage || rm -r coverage
.PHONY: clean-vendor
clean-vendor:
test ! -e vendor || rm -r vendor
.PHONY: setup
setup: vendor/autoload.php
.PHONY: deps-update
deps-update:
$(COMPOSER_BIN) update
.PHONY: phpunit
phpunit: setup
$(PHP_BIN) vendor/bin/phpunit
.PHONY: code-style
code-style: setup
PHP_CS_FIXER_IGNORE_ENV=1 $(PHP_BIN) vendor/bin/php-cs-fixer --diff -v fix
composer.lock: composer.json
$(COMPOSER_BIN) install
touch $@
vendor/autoload.php: composer.lock
$(COMPOSER_BIN) install
touch $@