mirror of
https://github.com/danog/process.git
synced 2024-11-26 12:14:43 +01:00
Add Makefile and update git files
This commit is contained in:
parent
c47b61d7e7
commit
6b991c898b
8
.gitattributes
vendored
Normal file
8
.gitattributes
vendored
Normal 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
12
.gitignore
vendored
@ -1,7 +1,5 @@
|
||||
/.idea
|
||||
/coverage
|
||||
/build
|
||||
/composer.lock
|
||||
/phpunit.xml
|
||||
/vendor
|
||||
/.php_cs.cache
|
||||
.php_cs.cache
|
||||
build
|
||||
composer.lock
|
||||
phpunit.xml
|
||||
vendor
|
||||
|
45
Makefile
Normal file
45
Makefile
Normal 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 $@
|
Loading…
Reference in New Issue
Block a user