diff --git a/.github/ext-sniff.sh b/.github/ext-sniff.sh new file mode 100755 index 0000000000..fc5bafc008 --- /dev/null +++ b/.github/ext-sniff.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set -x + +EXTNAME=$1 +NOTESTS=$2 + +if [ "$NOTESTS" == "1" ] +then + phpBB/vendor/bin/phpcs \ + -s \ + --extensions=php \ + --standard=build/code_sniffer/ruleset-php-extensions.xml \ + --ignore=*/"$EXTNAME"/tests/*,*/"$EXTNAME"/vendor/* \ + phpBB/ext/"$EXTNAME" +fi diff --git a/.github/prepare-extension.sh b/.github/prepare-extension.sh new file mode 100755 index 0000000000..9a1eee43c6 --- /dev/null +++ b/.github/prepare-extension.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set -x + +EXTNAME=$1 + +# Move the extension in place +mkdir --parents phpBB/ext/$EXTNAME +cp -R ../tmp/* phpBB/ext/$EXTNAME + +# Move the extensions .github/phpunit-*-travis.xml files in place +cp -R .github/*.xml phpBB/ext/$EXTNAME/.github +cp -R .github/*.sh phpBB/ext/$EXTNAME/.github