summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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" .