From 8807cd818921be5cf88de2e455f0d616e2c07aa9 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Tue, 24 Sep 2024 06:34:31 +0000 Subject: [PATCH] Allow to pass custom helm charts version * Allow to pass custom helm chart version during build like make all version=1.2.3+custom123 * add get-version target that allows to get version based on number of git commits in format + Change-Id: I1f04aeaa8dd49dfa2ed1d76aabd54a0d5bf8f573 --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 476e8fc97..efd6cb36e 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,14 @@ # It's necessary to set this because some environments don't link sh -> bash. SHELL := /bin/bash - HELM := helm TASK := build +PKG_ARGS = +ifdef VERSION + PKG_ARGS += --version $(VERSION) +endif + EXCLUDES := helm-toolkit doc tests tools logs tmp roles playbooks releasenotes zuul.d CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) @@ -36,7 +40,7 @@ lint-%: init-% if [ -d $* ]; then $(HELM) lint $*; fi build-%: lint-% - if [ -d $* ]; then $(HELM) package $*; fi + if [ -d $* ]; then $(HELM) package $* $(PKG_ARGS); fi clean: @echo "Removed .b64, _partials.tpl, and _globals.tpl files"