From fc0c09b83784e28cfc4ada4920043384aaa4ec04 Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Thu, 18 Jun 2026 18:08:41 +0500 Subject: [PATCH] ci(release): make CONSOLE_GIT_BRANCH lazy so it's skipped when overridden Address review feedback from gemini-code-assist on packages/system/dashboard/Makefile: switch CONSOLE_GIT_BRANCH from immediate (:=) to deferred (=) assignment. With ?= short-circuiting the fallback when CONSOLE_BRANCH is supplied (CI/release builds), lazy evaluation skips the git rev-parse shell spawn entirely instead of running it unconditionally at parse time. Resolved value is unchanged in all build contexts. Assisted-By: Claude Signed-off-by: Myasnikov Daniil --- packages/system/dashboard/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/system/dashboard/Makefile b/packages/system/dashboard/Makefile index 621914d90..032be1ef4 100644 --- a/packages/system/dashboard/Makefile +++ b/packages/system/dashboard/Makefile @@ -26,7 +26,7 @@ CONSOLE_REPO ?= https://github.com/cozystack/cozystack-ui.git # tag checkout is a detached HEAD where the branch name is unavailable. For # local/manual builds we derive it from the current branch: a release-X.Y # checkout builds the matching UI branch; everything else builds from main. -CONSOLE_GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) +CONSOLE_GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) CONSOLE_BRANCH ?= $(if $(filter release-%,$(CONSOLE_GIT_BRANCH)),$(CONSOLE_GIT_BRANCH),main) image-console: clone-console build-console update-values-console clean-console