diff --git a/.forgejo/scripts/notify-chart-bump.sh b/.forgejo/scripts/notify-chart-bump.sh index 863d1b6..b9a34ce 100755 --- a/.forgejo/scripts/notify-chart-bump.sh +++ b/.forgejo/scripts/notify-chart-bump.sh @@ -129,7 +129,20 @@ for BRANCH in $BRANCHES; do MAJC=$(echo "$OLD_CHART_VER" | cut -d. -f1) MINC=$(echo "$OLD_CHART_VER" | cut -d. -f2) PATC=$(echo "$OLD_CHART_VER" | cut -d. -f3) - NEW_CHART_VER="$MAJC.$MINC.$((PATC + 1))" + # Chart-version bump strategy: + # stable cut → MINOR++, PATCH=0 (e.g. 0.2.7 → 0.3.0) + # beta cut → PATCH++ (e.g. 0.3.0 → 0.3.1) + # This keeps the patch number bounded (≈ #betas-per-stable, not + # all-time), while staying monotonically increasing — JFrog chart + # repos reject duplicate chart-version numbers, so a literal + # "reset to 0.2.0" cycle would break uploads after the first + # stable cut. The actual zddc-server version lives in appVersion; + # chart version is just JFrog packaging metadata. + if [ "$CHANNEL" = "stable" ]; then + NEW_CHART_VER="$MAJC.$((MINC + 1)).0" + else + NEW_CHART_VER="$MAJC.$MINC.$((PATC + 1))" + fi sed -i "s/^version: .*/version: $NEW_CHART_VER/" chart/Chart.yaml echo " appVersion: $CURRENT → $TARGET_VERSION"