Skip to content

Commit 0a0168b

Browse files
committed
Update Helm chart versions to 0.0.6
- Bump version for main, frontend, and backend charts to 0.0.6. - Enhance the bump-version script for more precise version updates in Chart.yaml and dependencies.
1 parent e0909b0 commit 0a0168b

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

helm/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: amazee-ai
22
description: A Helm Chart for amazee.ai with independent frontend and backend services
3-
version: 0.0.3
3+
version: 0.0.6
44
apiVersion: v2
5-
appVersion: "0.0.3"
5+
appVersion: "0.0.6"
66
keywords:
77
- amazee.ai
88
- frontend
@@ -15,10 +15,10 @@ dependencies:
1515
repository: https://charts.bitnami.com/bitnami
1616
condition: postgresql.enabled
1717
- name: backend
18-
version: 0.0.3
18+
version: 0.0.6
1919
condition: backend.enabled
2020
dependsOn:
2121
- postgresql
2222
- name: frontend
23-
version: 0.0.3
23+
version: 0.0.6
2424
condition: frontend.enabled

helm/charts/backend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: backend
22
description: Backend API service for amazee.ai
3-
version: 0.0.3
3+
version: 0.0.6
44
apiVersion: v2
5-
appVersion: "0.0.3"
5+
appVersion: "0.0.6"
66
keywords:
77
- api
88
- fastapi

helm/charts/frontend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: frontend
22
description: Frontend web application for amazee.ai
3-
version: 0.0.3
3+
version: 0.0.6
44
apiVersion: v2
5-
appVersion: "0.0.3"
5+
appVersion: "0.0.6"
66
keywords:
77
- frontend
88
- nextjs

helm/scripts/bump-version.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ update_chart_version() {
6262
local new_version=$2
6363

6464
if [ -f "$chart_path/Chart.yaml" ]; then
65-
# Update version in Chart.yaml
66-
sed -i "s/^version: .*/version: $new_version/" "$chart_path/Chart.yaml"
65+
# Update version in Chart.yaml - be more precise to avoid dependency versions
66+
sed -i "/^name:/,/^apiVersion:/ s/^version: .*/version: $new_version/" "$chart_path/Chart.yaml"
6767

6868
# Update appVersion if it matches the old version pattern
6969
local current_app_version=$(grep '^appVersion:' "$chart_path/Chart.yaml" | awk '{print $2}' | tr -d '"')
@@ -83,15 +83,15 @@ update_dependency_versions() {
8383
local new_version=$2
8484

8585
if [ -f "$helm_dir/Chart.yaml" ]; then
86-
# Update backend dependency version
86+
# Update backend dependency version - use more precise pattern
8787
if grep -q "name: backend" "$helm_dir/Chart.yaml"; then
88-
sed -i "/name: backend/,/condition: backend.enabled/ s/version: [0-9]\+\.[0-9]\+\.[0-9]\+/version: $new_version/" "$helm_dir/Chart.yaml"
88+
sed -i "/^ - name: backend$/,/^ - name:/ s/^ version: .*/ version: $new_version/" "$helm_dir/Chart.yaml"
8989
print_status "Updated backend dependency version to $new_version"
9090
fi
9191

92-
# Update frontend dependency version
92+
# Update frontend dependency version - use more precise pattern
9393
if grep -q "name: frontend" "$helm_dir/Chart.yaml"; then
94-
sed -i "/name: frontend/,/condition: frontend.enabled/ s/version: [0-9]\+\.[0-9]\+\.[0-9]\+/version: $new_version/" "$helm_dir/Chart.yaml"
94+
sed -i "/^ - name: frontend$/,/^ - name:/ s/^ version: .*/ version: $new_version/" "$helm_dir/Chart.yaml"
9595
print_status "Updated frontend dependency version to $new_version"
9696
fi
9797
fi
@@ -132,26 +132,30 @@ process_chart() {
132132
fi
133133

134134
if [ -f "$chart_path/Chart.yaml" ]; then
135-
local current_version=$(grep '^version:' "$chart_path/Chart.yaml" | awk '{print $2}')
135+
# Read version more precisely - get the main version field, not dependency versions
136+
local current_version=$(sed -n '/^name:/,/^apiVersion:/p' "$chart_path/Chart.yaml" | grep '^version:' | awk '{print $2}')
136137
local new_version=$(bump_version "$current_version" "$BUMP_TYPE")
137138

138139
print_status "Processing $chart_name: $current_version -> $new_version"
139140
update_chart_version "$chart_path" "$new_version"
141+
142+
# Only update dependencies for the main chart
143+
if [ "$chart_path" = "$HELM_DIR" ]; then
144+
update_dependency_versions "$chart_path" "$new_version"
145+
fi
140146
fi
141147
}
142148

143149
# Process main chart
144150
if [ -z "$CHART_NAME" ] || [ "$CHART_NAME" = "amazee-ai" ]; then
145151
process_chart "$HELM_DIR"
146-
update_dependency_versions "$HELM_DIR" "$new_version"
147152
fi
148153

149154
# Process subcharts
150155
if [ -d "$HELM_DIR/charts" ]; then
151156
for chart_dir in "$HELM_DIR/charts"/*/; do
152157
if [ -d "$chart_dir" ]; then
153158
process_chart "$chart_dir"
154-
update_dependency_versions "$chart_dir" "$new_version"
155159
fi
156160
done
157161
fi

0 commit comments

Comments
 (0)