role=$1 # Generate the app/nut command ln -s ../vendor/bin/nut app/nut # Update extensions cd ./extensions && \ ( sudo -u $WWW_USER composer update -o --no-dev || exit 1 ) && \ cd .. # Check if database schema is in sync with new version ot fail (forcing a rollback) if [[ "$role" == "master" ]]; then sudo -u $WWW_USER app/nut database:update --no-interaction || exit 1 fi # Clear application caches sudo -u $WWW_USER app/nut cache:clear || exit 1