diff options
author | Robin Appelman <robin@icewind.nl> | 2020-11-26 15:47:33 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-12-04 14:27:03 +0100 |
commit | ec041c3ad5452312abd5ec01921ffc8d8d79becc (patch) | |
tree | 7d17692030ff54c3fe875d4006927067230a3915 /build/autoloaderchecker.sh | |
parent | a53871f6290f12341f4b2a9531e17bc2f932ba69 (diff) | |
download | nextcloud-server-ec041c3ad5452312abd5ec01921ffc8d8d79becc.tar.gz nextcloud-server-ec041c3ad5452312abd5ec01921ffc8d8d79becc.zip |
dont use system composer for autoload checker
this ensures that the same composer version is used by everyone (and ci)
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'build/autoloaderchecker.sh')
-rwxr-xr-x | build/autoloaderchecker.sh | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/build/autoloaderchecker.sh b/build/autoloaderchecker.sh index ffa157f6c80..3a5ac32913a 100755 --- a/build/autoloaderchecker.sh +++ b/build/autoloaderchecker.sh @@ -1,26 +1,18 @@ #!/usr/bin/env bash -COMPOSER_COMMAND=$(which "composer") -if [ "$COMPOSER_COMMAND" = '' ] +COMPOSER_COMMAND="php composer.phar" + +if [ -e "composer.phar" ] then - #No global composer found, try local or download it - if [ -e "composer.phar" ] - then - echo "Composer found: checking for update" - else - echo "Composer not found: fetching" - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php composer-setup.php - php -r "unlink('composer-setup.php');" - fi - - COMPOSER_COMMAND="php composer.phar" + echo "Composer found: checking for update" + $COMPOSER_COMMAND self-update else - echo "Global composer found: checking for update" + echo "Composer not found: fetching" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + php composer-setup.php + php -r "unlink('composer-setup.php');" fi -#Make sure we are on the latest composer -$COMPOSER_COMMAND self-update REPODIR=`git rev-parse --show-toplevel` |