aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-11-26 15:47:33 +0100
committerRobin Appelman <robin@icewind.nl>2020-11-26 15:48:46 +0100
commit3e2e694ea9f43689e964d23048aea8d8c6616e49 (patch)
treee8cfc9c1d8469d35cffa9cb828d900d9deb01ecd
parent54e3beba165739c480730f797e2b386b12a92713 (diff)
downloadnextcloud-server-3e2e694ea9f43689e964d23048aea8d8c6616e49.tar.gz
nextcloud-server-3e2e694ea9f43689e964d23048aea8d8c6616e49.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>
-rw-r--r--.gitignore2
-rwxr-xr-xbuild/autoloaderchecker.sh26
2 files changed, 11 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 27d5dbecc51..653c317863d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -158,3 +158,5 @@ clover.xml
# Tests - dependencies
tests/acceptance/composer.lock
tests/acceptance/vendor/
+
+composer.phar
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`