Last active
July 21, 2023 13:49
-
-
Save lucaswerkmeister/4cda7f1d146c912f7439251391397a16 to your computer and use it in GitHub Desktop.
MediaWiki development helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
printf >&2 '%s: at least one argument is required\n' "$0" | |
exit 1 | |
fi | |
if [ -e "$1" ]; then | |
file=$(realpath "$1") | |
else | |
file=$1 | |
fi | |
shift 1 | |
while ! [ -f api.php ]; do | |
cd .. | |
if [ "$PWD" = '/' ]; then | |
cd /var/www/html/wiki1/ | |
break | |
fi | |
done | |
exec php maintenance/run.php "$file" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec maint shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
basedir="$PWD" | |
while ! [ -f api.php ]; do | |
cd .. | |
if [ "$PWD" = '/' ]; then | |
printf >&2 '%s: no MediaWiki parent directory found\n' "$0" | |
exit 1 | |
fi | |
done | |
if [ $# -gt 0 ]; then | |
path="$1" | |
shift | |
else | |
path='tests/phpunit/' | |
fi | |
exec composer phpunit:entrypoint "$basedir/$path" -- "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage examples:
phps # interactive PHP shell maint runJobs maint update --quick maint rebuildLocalisationCache --lang en run-tests run-tests repo/tests/phpunit/includes/RepoHooksTest.php