Skip to content

Commit

Permalink
Merge pull request #24561 from nextcloud/backport/24557/stable19
Browse files Browse the repository at this point in the history
[stable19] [stable20] dont use system composer for autoload checker
  • Loading branch information
rullzer authored Dec 7, 2020
2 parents 6091ae9 + 0f57630 commit 71e4066
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,5 @@ clover.xml
# Tests - dependencies
tests/acceptance/composer.lock
tests/acceptance/vendor/

composer.phar
28 changes: 11 additions & 17 deletions build/autoloaderchecker.sh
Original file line number Diff line number Diff line change
@@ -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 --1
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`

Expand Down Expand Up @@ -50,6 +42,8 @@ do
fi
done

rm composer.phar

echo
if [ $composerfile = true ]
then
Expand Down

0 comments on commit 71e4066

Please sign in to comment.