Skip to content

Commit 577a588

Browse files
committed
fix: Rewrite crd-ref-release when cutting a release branch
make-release-branch.sh already rewrites version, prerelease and crd-docs-version; without this, a release branch would keep ?release=dev and its Hub CRD links would show bleeding-edge schemas. The Hub names releases by major.minor, so this uses DOCS_VERSION (e.g. 26.7), not VERSION (e.g. 26.7.1); the Hub 301s patch-level values but major.minor is canonical.
1 parent b9dc3c4 commit 577a588

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/make-release-branch.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ sed -i "s/^prerelease:.*/prerelease: false/" "$ANTORA_YAML_FILE"
120120
# Set crd-docs-version key to the 'version' variable
121121
sed -i "s/^\(\s*\)crd-docs-version:.*/\1crd-docs-version: \"$VERSION\"/" "$ANTORA_YAML_FILE"
122122

123+
# Set the Hub release for the CRD reference links. The Hub names releases
124+
# by major.minor, so this uses DOCS_VERSION, not VERSION.
125+
sed -i "s/^\(\s*\)crd-ref-release:.*/\1crd-ref-release: \"?release=$DOCS_VERSION\"/" "$ANTORA_YAML_FILE"
126+
123127
# Display changes using git diff
124128
git diff "$ANTORA_YAML_FILE"
125129

0 commit comments

Comments
 (0)