diff options
author | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-11 19:32:55 +0100 |
---|---|---|
committer | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-11 19:32:55 +0100 |
commit | e790b503eadf1ad45240edaebcb51133d8fcff9c (patch) | |
tree | 262cd3457460523c2804bf5c4f6109664aa492b7 | |
parent | beef838f514a37fa97936e4d9c9f718b69d95ce5 (diff) | |
download | planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.gz planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.bz2 planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.xz planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.zip |
Add Makefile
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | Makefile | 31 | ||||
-rwxr-xr-x | bin/build_release.sh | 2 |
3 files changed, 37 insertions, 2 deletions
@@ -8,4 +8,8 @@ /tests/_output/* /nbproject/private/ -/.idea/
\ No newline at end of file +/.idea/ +tmp/ + +.phpunit.result.cache + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..17647f0 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ + +VENDOR=./vendor/bin/ + +test: + { php -S 127.0.0.1:8081 >& /dev/null & }; \ + PID=$$!; \ + $(VENDOR)phpunit; \ + RES=$$?; \ + kill $$PID; \ + exit $$RES + +fmt: + $(VENDOR)phpcbf + +cs: + $(VENDOR)phpcs + +lint: + $(VENDOR)parallel-lint --exclude vendor . + +stan: + $(VENDOR)phpstan analyze -c phpstan.neon + +report: + $(VENDOR)phpmd \ + admin,app,custom,docs,tests,atom.php,cron.php,index.php,install.php,postload.php \ + html \ + cleancode,codesize,controversial,design,naming,unusedcode > tmp/report.html + +serve: + php -S localhost:5555 -t . diff --git a/bin/build_release.sh b/bin/build_release.sh index 2f09661..ee08979 100755 --- a/bin/build_release.sh +++ b/bin/build_release.sh @@ -12,7 +12,7 @@ cd moonmoon composer install --no-suggest --prefer-dist --no-dev git describe --abbrev=0 --tags > VERSION find . -name .DS_Store -exec rm {} \; -rm -rf .git .github .travis.yml .gitignore .gitmodules docs/.git/ +rm -rf .git .github .travis.yml .gitignore .gitmodules docs/.git/ Makefile phpcs.xml phpunit.xml mkdir cache cd .. zip -r "moonmoon-$(cat moonmoon/VERSION).zip" . |