Skip to content

Commit 69448ec

Browse files
fix(build): guard empty COZYSTACK_VERSION in operator render
Address review feedback from gemini-code-assist on Makefile:56,64,73: when COZYSTACK_VERSION is empty, v$(COZYSTACK_VERSION) expanded to a bare 'v', which is truthy and made the installer template render COZYSTACK_VERSION="v", overriding the operator's baked-in version. Guard each --set with $(if ...) so an empty version passes an empty value and the operator falls back to its build-time version. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 2f92149 commit 69448ec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ manifests:
5353
# Talos variant (default)
5454
helm template installer packages/core/installer -n cozy-system \
5555
--set bareNamespace=true \
56-
--set cozystackOperator.platformVersion=v$(COZYSTACK_VERSION) \
56+
--set cozystackOperator.platformVersion=$(if $(COZYSTACK_VERSION),v$(COZYSTACK_VERSION),) \
5757
--show-only templates/cozy-system-namespace.yaml \
5858
--show-only templates/cozystack-operator.yaml \
5959
> _out/assets/cozystack-operator-talos.yaml
6060
# Generic Kubernetes variant (k3s, kubeadm, RKE2)
6161
helm template installer packages/core/installer -n cozy-system \
6262
--set bareNamespace=true \
6363
--set cozystackOperator.variant=generic \
64-
--set cozystackOperator.platformVersion=v$(COZYSTACK_VERSION) \
64+
--set cozystackOperator.platformVersion=$(if $(COZYSTACK_VERSION),v$(COZYSTACK_VERSION),) \
6565
--set cozystack.apiServerHost=REPLACE_ME \
6666
--show-only templates/cozy-system-namespace.yaml \
6767
--show-only templates/cozystack-operator.yaml \
@@ -70,7 +70,7 @@ manifests:
7070
helm template installer packages/core/installer -n cozy-system \
7171
--set bareNamespace=true \
7272
--set cozystackOperator.variant=hosted \
73-
--set cozystackOperator.platformVersion=v$(COZYSTACK_VERSION) \
73+
--set cozystackOperator.platformVersion=$(if $(COZYSTACK_VERSION),v$(COZYSTACK_VERSION),) \
7474
--show-only templates/cozy-system-namespace.yaml \
7575
--show-only templates/cozystack-operator.yaml \
7676
> _out/assets/cozystack-operator-hosted.yaml

0 commit comments

Comments
 (0)