From 084402c7bcee9ed2d2ceebd63304a6798b0988b4 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Sat, 29 Nov 2025 10:15:46 +0200 Subject: [PATCH] build: fail early for unclean git tree in update-deps make target --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 78e0c79..954cb70 100644 --- a/Makefile +++ b/Makefile @@ -314,7 +314,13 @@ update-composer-deps: $(composer_bin) update @echo "\x1b[32mDependencies updated and lockfile refreshed.\x1b[0m" -update-deps: update-pnpm-deps update-composer-deps +update-deps: + @if [ -n "$$(git status --porcelain)" ]; then \ + echo "\x1b[31mError: Working directory is not clean. Please commit or stash changes first.\x1b[0m"; \ + git status --short; \ + exit 1; \ + fi + @$(MAKE) update-pnpm-deps update-composer-deps @echo "\x1b[36mAll dependencies updated.\x1b[0m" @echo "\x1b[36mPush changes? [Y/n]\x1b[0m" @read ans; \