diff --git a/composer.json b/composer.json index 075c300..ef5b873 100644 --- a/composer.json +++ b/composer.json @@ -98,5 +98,5 @@ "minimum-stability": "stable", "prefer-stable": true, "version": "26.0.2", - "build": "56" + "build": "58" } diff --git a/git_update.sh b/git_update.sh index d15af4a..16ca8b8 100755 --- a/git_update.sh +++ b/git_update.sh @@ -4,10 +4,17 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$ROOT_DIR" -if [[ -n "$(git status --porcelain)" ]]; then +git restore -q bootstrap/cache/packages.php bootstrap/cache/services.php 2>/dev/null || true +DIRTY="$(git status --porcelain)" +DIRTY_FILTERED="$(echo "$DIRTY" | grep -vE '^( M|M ) (bootstrap/cache/(packages|services)\.php|package-lock\.json)$' || true)" +if [[ -n "$DIRTY_FILTERED" ]]; then echo "Working tree is dirty. Please commit or stash changes before updating." + echo "$DIRTY_FILTERED" exit 1 fi +if echo "$DIRTY" | grep -qE 'package-lock\.json'; then + echo "Warning: package-lock.json is modified. Continuing anyway." +fi echo "Fetching latest refs..." git fetch --prune --tags