mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-17 15:49:34 +00:00
Use --no-install with require and run separate install command
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
parent
562e4772cd
commit
e12bf570f9
2 changed files with 20 additions and 6 deletions
|
|
@ -32,11 +32,18 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
||||||
# Note: COMPOSER_EXTRA_PACKAGES is intentionally not quoted to allow word splitting
|
# Note: COMPOSER_EXTRA_PACKAGES is intentionally not quoted to allow word splitting
|
||||||
# This enables passing multiple package names separated by spaces
|
# This enables passing multiple package names separated by spaces
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
composer require $COMPOSER_EXTRA_PACKAGES --no-dev --no-interaction --no-progress --optimize-autoloader
|
composer require $COMPOSER_EXTRA_PACKAGES --no-install --no-interaction --no-progress
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Successfully installed additional composer packages"
|
echo "Running composer install to install packages without dev dependencies..."
|
||||||
|
composer install --no-dev --no-interaction --no-progress --optimize-autoloader
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Successfully installed additional composer packages"
|
||||||
|
else
|
||||||
|
echo "Failed to install composer dependencies"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to install additional composer packages"
|
echo "Failed to add additional composer packages to composer.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,18 @@ if [ -n "$COMPOSER_EXTRA_PACKAGES" ]; then
|
||||||
# Note: COMPOSER_EXTRA_PACKAGES is intentionally not quoted to allow word splitting
|
# Note: COMPOSER_EXTRA_PACKAGES is intentionally not quoted to allow word splitting
|
||||||
# This enables passing multiple package names separated by spaces
|
# This enables passing multiple package names separated by spaces
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
sudo -E -u www-data composer require $COMPOSER_EXTRA_PACKAGES --no-dev --no-interaction --no-progress --optimize-autoloader
|
sudo -E -u www-data composer require $COMPOSER_EXTRA_PACKAGES --no-install --no-interaction --no-progress
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Successfully installed additional composer packages"
|
echo "Running composer install to install packages without dev dependencies..."
|
||||||
|
sudo -E -u www-data composer install --no-dev --no-interaction --no-progress --optimize-autoloader
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Successfully installed additional composer packages"
|
||||||
|
else
|
||||||
|
echo "Failed to install composer dependencies"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to install additional composer packages"
|
echo "Failed to add additional composer packages to composer.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue