diff --git a/.github/ext-check-executable-files.sh b/.github/ext-check-executable-files.sh new file mode 100755 index 0000000000..affcfa03cc --- /dev/null +++ b/.github/ext-check-executable-files.sh @@ -0,0 +1,64 @@ +#!/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 + +root="$1" +extname="$2" +path="${root}phpBB/ext/${extname}/" + +# Check the permissions of the files + +# The following variables MUST NOT contain any wildcard +# Directories to skip +directories_skipped="-path ${path}develop -o -path ${path}vendor" + +# Files to skip +files_skipped="-false" + +# Files which have to be executable +executable_files="-path ${path}bin/* -o -path ${path}install/phpbbcli.php" + +incorrect_files=$( \ + find ${path} \ + '(' \ + '(' \ + ${directories_skipped} \ + ')' \ + -a -type d -prune -a -type f \ + ')' -o \ + '(' \ + -type f -a \ + -not '(' \ + ${files_skipped} \ + ')' -a \ + '(' \ + '(' \ + '(' \ + ${executable_files} \ + ')' -a \ + -not -perm /100 \ + ')' -o \ + '(' \ + -not '(' \ + ${executable_files} \ + ')' -a \ + -perm /111 \ + ')' \ + ')' \ + ')' \ + ) + +if [ "${incorrect_files}" != '' ] +then + echo "The following files do not have proper permissions:"; + ls -la ${incorrect_files} + exit 1; +fi diff --git a/.github/phpunit-sqlite3-github.xml b/.github/phpunit-sqlite3-github.xml index f5b2b67b22..b079a0bbbe 100644 --- a/.github/phpunit-sqlite3-github.xml +++ b/.github/phpunit-sqlite3-github.xml @@ -27,12 +27,6 @@ - - - - - - diff --git a/.github/prepare-extension.sh b/.github/prepare-extension.sh index 9a1eee43c6..d3adc95ec5 100755 --- a/.github/prepare-extension.sh +++ b/.github/prepare-extension.sh @@ -17,6 +17,6 @@ EXTNAME=$1 mkdir --parents phpBB/ext/$EXTNAME cp -R ../tmp/* phpBB/ext/$EXTNAME -# Move the extensions .github/phpunit-*-travis.xml files in place +# Move the test files for extensions in place cp -R .github/*.xml phpBB/ext/$EXTNAME/.github cp -R .github/*.sh phpBB/ext/$EXTNAME/.github