fix entrypoint
All checks were successful
All checks were successful
This commit is contained in:
@@ -81,22 +81,27 @@ grep "APP_KEY" .env
|
|||||||
|
|
||||||
# Ensure vendor directory matches composer.lock exactly, syncing missing packages
|
# Ensure vendor directory matches composer.lock exactly, syncing missing packages
|
||||||
echo "Verifying and synchronizing Composer dependencies..."
|
echo "Verifying and synchronizing Composer dependencies..."
|
||||||
# Run composer install to physically ensure all files (like laravel/prompts) are present in the volume
|
|
||||||
composer install --no-interaction --optimize-autoloader
|
|
||||||
|
|
||||||
|
# Check if scribe is in composer.json but not installed
|
||||||
# Ensure vendor directory matches composer.lock exactly, syncing missing packages
|
if grep -q "knuckleswtf/scribe" composer.json; then
|
||||||
echo "Verifying and synchronizing Composer dependencies..."
|
if ! composer show --locked knuckleswtf/scribe --no-ansi 2>/dev/null | grep -q "name"; then
|
||||||
|
echo "📦 knuckleswtf/scribe found in composer.json but not in lock file. Installing..."
|
||||||
# Check if composer.json has new packages not in lock file
|
composer require --dev knuckleswtf/scribe --no-interaction --no-progress --update-with-dependencies
|
||||||
if composer validate --no-check-all --no-check-publish 2>/dev/null | grep -q "The lock file is not up to date"; then
|
else
|
||||||
echo "⚠️ Composer lock file is outdated. Running composer update to sync..."
|
echo "✅ knuckleswtf/scribe is already in lock file"
|
||||||
composer update --no-interaction --optimize-autoloader
|
composer install --no-interaction --optimize-autoloader
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# Run composer install to physically ensure all files are present
|
# Normal install
|
||||||
composer install --no-interaction --optimize-autoloader
|
composer install --no-interaction --optimize-autoloader
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If install fails, try update
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "⚠️ Composer install failed, attempting update..."
|
||||||
|
composer update --no-interaction --optimize-autoloader --with-all-dependencies
|
||||||
|
fi
|
||||||
|
|
||||||
# Install and publish Scribe assets
|
# Install and publish Scribe assets
|
||||||
echo "Setting up Scribe/OpenAPI documentation..."
|
echo "Setting up Scribe/OpenAPI documentation..."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user