Compare commits

...

2 Commits

Author SHA1 Message Date
Asher
6fd40c04c7 Fix Helm chart version bump script
Instead of relying on semver which is not installed, just parse it with
bash.
2026-06-02 11:29:19 -08:00
cdrci
63c071959f Update Helm chart and changelog with 4.122.1 (#7835) 2026-06-02 10:42:18 -08:00
4 changed files with 62 additions and 11 deletions

View File

@@ -22,6 +22,8 @@ Code v99.99.999
## Unreleased
## [4.122.1](https://github.com/coder/code-server/releases/tag/v4.122.1) - 2026-06-02
Code v1.122.1
### Changed

View File

@@ -2,16 +2,65 @@
set -Eeuo pipefail
function update_helm() {
local current
current=$(yq .version ci/helm-chart/Chart.yaml)
local next
next=$(semver "$current" -i minor)
echo "Bumping version from $current to $next..."
sed -i.bak "s/^version: $current\$/version: $next/" ci/helm-chart/Chart.yaml
# Given versions $1 and $2 figure out the first component that is different
# (major, minor, patch).
function find_version_diff() {
# shellcheck disable=SC2206
local a=( ${1//./ } )
# shellcheck disable=SC2206
local b=( ${2//./ } )
echo "Setting app version and image to $version..."
if [[ ${a[0]} != "${b[0]}" ]] ; then
echo major
elif [[ ${a[1]} != "${b[1]}" ]] ; then
echo minor
else
echo patch
fi
}
# Bump $1 by the bump type (major, minor, patch) in $2.
function bump_version() {
# shellcheck disable=SC2206
local a=( ${1//./ } )
case $2 in
major)
((a[0]++))
a[1]=0
a[2]=0
;;
minor)
((a[1]++))
a[2]=0
;;
*)
((a[2]++))
;;
esac
echo "${a[0]}.${a[1]}.${a[2]}"
}
function update_helm() {
local chart_version
chart_version=$(yq .version ci/helm-chart/Chart.yaml)
local app_version
app_version=$(yq .appVersion ci/helm-chart/Chart.yaml)
local image_version
image_version=$(yq .image.tag ci/helm-chart/values.yaml)
local bump_type
bump_type=$(find_version_diff "$app_version" "$version")
local chart_version_bump
chart_version_bump=$(bump_version "$chart_version" "$bump_type")
# Use sed to replace because yq will reformat.
echo "Bumping version from $chart_version to $chart_version_bump..."
sed -i.bak "s/^version: $chart_version\$/version: $chart_version_bump/" ci/helm-chart/Chart.yaml
echo "Bumping app version from $app_version to $version..."
sed -i.bak "s/^appVersion: .\+\$/appVersion: $version/" ci/helm-chart/Chart.yaml
echo "Bumping image version from $image_version to $version..."
sed -i.bak "s/^ tag: .\+\$/ tag: '$version'/" ci/helm-chart/values.yaml
}

View File

@@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.37.0
version: 3.37.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.122.0
appVersion: 4.122.1

View File

@@ -6,7 +6,7 @@ replicaCount: 1
image:
repository: codercom/code-server
tag: '4.122.0'
tag: '4.122.1'
pullPolicy: Always
# Specifies one or more secrets to be used when pulling images from a