diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-10-17 22:55:06 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-10-17 22:55:06 +0300 |
commit | 5d7d96dc453724d78dd6023c6466fcbee7248d70 (patch) | |
tree | cee7be55c40b38c7f25b89c2bc107032f6dc12c1 /build/autoloaderchecker.sh | |
parent | f51eccf34ac5c21e1b72cc7cab77b46e96c72f6b (diff) |
Update autoload checker
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'build/autoloaderchecker.sh')
-rw-r--r-- | build/autoloaderchecker.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/build/autoloaderchecker.sh b/build/autoloaderchecker.sh index 9b1c30d59cb..ffa157f6c80 100644 --- a/build/autoloaderchecker.sh +++ b/build/autoloaderchecker.sh @@ -24,16 +24,26 @@ $COMPOSER_COMMAND self-update REPODIR=`git rev-parse --show-toplevel` -#Redump the autoloader +#Redump the main autoloader echo -echo "Regenerating autoloader" +echo "Regenerating main autoloader" $COMPOSER_COMMAND dump-autoload -d $REPODIR +for app in ${REPODIR}/apps/*; do + if [[ -d $app ]]; then + if [[ -e ${app}/composer/composer.json ]]; then + echo + echo "Regenerating autoloader for ${app}" + $COMPOSER_COMMAND dump-autoload -d ${app}/composer + fi + fi +done + files=`git diff --name-only` composerfile=false for file in $files do - if [[ $file == lib/composer/* ]] + if [[ $file == *autoload_classmap* ]] then composerfile=true break @@ -43,10 +53,9 @@ done echo if [ $composerfile = true ] then - echo "The autoloader is not up to date" + echo "The autoloaders are not up to date" echo "Please run: bash build/autoloaderchecker.sh" echo "And commit the result" - git diff lib/composer exit 1 else echo "Autoloader up to date. Carry on" |