File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 11VERSION ?= 0.38.1
2+ HELM_VERSION ?= 0.38.1
23
34CHANNELS ?= alpha
45BUNDLE_CHANNELS := --channels=$(CHANNELS )
@@ -60,7 +61,7 @@ help: ## Display this help.
6061
6162.PHONY : sync-chart
6263sync-chart : # # Sync helm chart.
63- @./hack/sync-chart.sh $(VERSION )
64+ @./hack/sync-chart.sh $(HELM_VERSION )
6465
6566# #@ Build
6667
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- VERSION=$1
5+ normalize_version () {
6+ local version=" $1 "
7+ IFS=' .' read -r major minor patch <<< " $version"
8+
9+ # Remove leading zeroes safely by using arithmetic expansion
10+ major=$(( 10 #$major ))
11+ minor=$(( 10 #$minor ))
12+ patch=$(( 10 #$patch ))
13+
14+ echo " $major .$minor .$patch "
15+ }
16+
17+ INPUT_VERSION=$1
18+ VERSION=$( normalize_version " $INPUT_VERSION " )
19+
20+ echo " 📦 Input version: '$INPUT_VERSION '"
21+ echo " 📦 Normalized to semver-compliant version: '$VERSION '"
622
723echo " 📦 Bumping bundle to version '$VERSION '"
824
925echo " 📦 Updating Makefile"
1026sed -i " s/VERSION ?= .*/VERSION ?= $VERSION /g" Makefile
27+ sed -i " s/HELM_VERSION ?= .*/HELM_VERSION ?= $INPUT_VERSION /g" Makefile
1128
1229echo " 📦 Generating bundle"
1330make bundle
You can’t perform that action at this time.
0 commit comments