]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont use system composer for autoload checker
authorRobin Appelman <robin@icewind.nl>
Thu, 26 Nov 2020 14:47:33 +0000 (15:47 +0100)
committerRobin Appelman <robin@icewind.nl>
Thu, 26 Nov 2020 14:48:46 +0000 (15:48 +0100)
this ensures that the same composer version is used by everyone (and ci)

Signed-off-by: Robin Appelman <robin@icewind.nl>
.gitignore
build/autoloaderchecker.sh

index 27d5dbecc5189a4e426166f1fe70dd05006e5304..653c317863dc0b284b36f32fe3402b8528c75222 100644 (file)
@@ -158,3 +158,5 @@ clover.xml
 # Tests - dependencies
 tests/acceptance/composer.lock
 tests/acceptance/vendor/
+
+composer.phar
index ffa157f6c8091880490d16865f633e56cb403945..3a5ac32913a1f2c002e0f27ef8d361993405b76f 100755 (executable)
@@ -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`