File tree Expand file tree Collapse file tree
cli/pkg/kubectl/dev/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,12 +55,11 @@ jobs:
5555 echo "org.opencontainers.image.version=${{ github.ref_name }}"
5656 echo 'EOF'
5757 } >> "$GITHUB_ENV"
58- # Helm chart version: semver from tag, otherwise 0.0.0-<sha>
58+ # App version: full tag (e.g. v0.8.1) for releases , otherwise 0.0.0-<sha>
5959 if [[ "${{ github.ref_type }}" == "tag" ]]; then
60- chart_version="${{ github.ref_name }}"
61- echo "CHART_VERSION=${chart_version#v}" >> "$GITHUB_ENV"
60+ echo "APP_VERSION=${{ github.ref_name }}" >> "$GITHUB_ENV"
6261 else
63- echo "CHART_VERSION =0.0.0-${{ github.sha }}" >> "$GITHUB_ENV"
62+ echo "APP_VERSION =0.0.0-${{ github.sha }}" >> "$GITHUB_ENV"
6463 fi
6564
6665 - name : Login to GitHub Container Registry
Original file line number Diff line number Diff line change @@ -420,11 +420,12 @@ build-web:
420420# Image / release configuration.
421421# IMAGE_TAGS is the space-separated list of tag suffixes applied to each component image.
422422# IMAGE_PUSH_PLATFORMS is the platform list for `image-push` (multi-arch by default).
423- # CHART_VERSION is the helm chart version; defaults to 0.0.0-$REV.
423+ # APP_VERSION is the application version passed to helm-build.sh; defaults to 0.0.0-$REV.
424+ # helm-build.sh strips the leading "v" to derive a valid Helm chart semver.
424425# IMAGE_METADATA_DIR holds buildx metadata files used by `image-sign`.
425426export IMAGE_TAGS ?= $(REV )
426427IMAGE_PUSH_PLATFORMS ?= linux/amd64,linux/arm64
427- export CHART_VERSION ?= 0.0.0-$(REV )
428+ export APP_VERSION ?= 0.0.0-$(REV )
428429IMAGE_METADATA_DIR ?= $(BUILD_DIR ) /image-metadata
429430
430431# Example: make IMAGE_REPO=ghcr.io/<username> image-local
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ type DevOptions struct {
7070}
7171
7272// fallbackAssetVersion is used when unable to fetch the latest version
73- const fallbackAssetVersion = "0.7 .1"
73+ const fallbackAssetVersion = "0.8 .1"
7474
7575// gitHubRelease represents a GitHub release response
7676type gitHubRelease struct {
Original file line number Diff line number Diff line change @@ -15,10 +15,12 @@ type: application
1515# This is the chart version. This version number should be incremented each time you make changes
1616# to the chart and its templates, including the app version.
1717# Versions are expected to follow Semantic Versioning (https://semver.org/)
18- version : 0.1.0
18+ # NOTE: updated by helm-build.sh during the build — do not edit manually.
19+ version : 0.0.0
1920
2021# This is the version number of the application being deployed. This version number should be
2122# incremented each time you make changes to the application. Versions are not expected to
2223# follow Semantic Versioning. They should reflect the version the application is using.
2324# It is recommended to use it with quotes.
24- appVersion : " v0.7.1"
25+ # NOTE: updated by helm-build.sh during the build — do not edit manually.
26+ appVersion : " 0.0.0"
Original file line number Diff line number Diff line change 22
33A Helm chart for kube-bind backend deployment
44
5- ![ Version: 0.1 .0] ( https://img.shields.io/badge/Version-0.1 .0-informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: v0.7.1 ] ( https://img.shields.io/badge/AppVersion-v0.7.1 -informational?style=flat-square )
5+ ![ Version: 0.0 .0] ( https://img.shields.io/badge/Version-0.0 .0-informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.0.0 ] ( https://img.shields.io/badge/AppVersion-0.0.0 -informational?style=flat-square )
66
77## Installation
88
Original file line number Diff line number Diff line change 1616
1717set -eu
1818
19- # Inputs (env vars):
20- # REV short git sha (required if CHART_VERSION is unset)
21- # CHART_VERSION chart version string; default: 0.0.0-$REV
19+ APP_VERSION=" ${APP_VERSION:- 0.0.0-${REV:- } } "
20+ if [[ -z " $APP_VERSION " || " $APP_VERSION " == " 0.0.0-" ]]; then
21+ echo " ERROR: APP_VERSION or REV must be set" >&2 ; exit 1
22+ fi
23+ CHART_VERSION=" ${APP_VERSION# v} "
2224
23- : " ${CHART_VERSION:= 0.0.0-${REV:? REV must be set when CHART_VERSION is unset} } "
24-
25- echo " Building Helm charts (version: $CHART_VERSION )..."
25+ echo " Building Helm charts (appVersion: $APP_VERSION , chartVersion: $CHART_VERSION )..."
2626
2727HELM=" $( UGET_PRINT_PATH=absolute make --no-print-directory install-helm) "
2828
@@ -33,7 +33,7 @@ for chart_dir in deploy/charts/*/; do
3333
3434 cp " ${chart_dir} Chart.yaml" " ${chart_dir} Chart.yaml.bak"
3535 sed -i.tmp " s/^version:.*/version: $CHART_VERSION /" " ${chart_dir} Chart.yaml"
36- sed -i.tmp " s/^appVersion:.*/appVersion: $CHART_VERSION /" " ${chart_dir} Chart.yaml"
36+ sed -i.tmp " s/^appVersion:.*/appVersion: \" $APP_VERSION \" /" " ${chart_dir} Chart.yaml"
3737 rm -f " ${chart_dir} Chart.yaml.tmp"
3838
3939 " $HELM " package " $chart_dir " --version " $CHART_VERSION " --destination ./bin/
You can’t perform that action at this time.
0 commit comments