mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-03 10:37:21 +09:00
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 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user