]> git.wh0rd.org Git - tt-rss.git/commitdiff
ci: check syntax via php first
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 26 Apr 2017 13:26:53 +0000 (16:26 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 26 Apr 2017 13:26:53 +0000 (16:26 +0300)
.gitlab-ci.yml
utils/gitlab-ci/php-lint.sh [new file with mode: 0644]
utils/gitlab-ci/phpmd.sh

index ce6be002a8c86c7755158e6d4a6de1b13ce7c6a4..b66939c49645b83dc828e8fad176f51ea4d824fe 100644 (file)
@@ -1,6 +1,7 @@
 phpmd:\r
   image: php:5.6\r
   script:\r
+    - sh utils/php-lint.sh\r
     - curl -o /usr/bin/phpmd -L http://static.phpmd.org/php/2.6.0/phpmd.phar\r
     - chmod +x /usr/bin/phpmd\r
     - sh utils/gitlab-ci/phpmd.sh\r
diff --git a/utils/gitlab-ci/php-lint.sh b/utils/gitlab-ci/php-lint.sh
new file mode 100644 (file)
index 0000000..172abd8
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+exec find . -name "*.php" -not -path "*/lib/*" -print0 | xargs -0 -n1 php -l
index e5bad474da4aee983683ea43a822b8b5857d8e55..ec3ec303380f08c1ad8c1929b6bbd62a513ad5aa 100644 (file)
@@ -1,7 +1,8 @@
-#!/bin/sh -e
+#!/bin/sh -i -e
 
 #phpmd include text utils/gitlab-ci/phpmd-ruleset.xml
 #phpmd classes text utils/gitlab-ci/phpmd-ruleset.xml
 
 FILES=$(ls -dm *.php | tr -d " "| tr -d "\n")
 phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml
+