summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rdalverny@gmail.com>2022-01-11 19:32:55 +0100
committerRomain d'Alverny <rdalverny@gmail.com>2022-01-11 19:32:55 +0100
commite790b503eadf1ad45240edaebcb51133d8fcff9c (patch)
tree262cd3457460523c2804bf5c4f6109664aa492b7
parentbeef838f514a37fa97936e4d9c9f718b69d95ce5 (diff)
downloadplanet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar
planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.gz
planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.bz2
planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.tar.xz
planet-e790b503eadf1ad45240edaebcb51133d8fcff9c.zip
Add Makefile
-rw-r--r--.gitignore6
-rw-r--r--Makefile31
-rwxr-xr-xbin/build_release.sh2
3 files changed, 37 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index eee3ac8..5101c47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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" .