Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b230fc0

Browse files
committed
Update k8s API version if the old client was a snapshot
1 parent e0e60fa commit b230fc0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/release.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,12 @@ git commit -am "update version constants for $CLIENT_VERSION release"
185185
# TODO(roycaihw): not all Kubernetes API changes modify the OpenAPI spec.
186186
# Download the patch and skip if the spec is not modified. Also we want to
187187
# look at other k/k sections like "deprecation"
188-
if [[ $CLIENT_VERSION == *"snapshot"* ]]; then
189-
# Update "Kubernetes API Version" if we are generating a snapshot
188+
if [[ $old_client_version == *"snapshot"* ]]; then
189+
# If the old client version was a snapshot, update the changelog in place
190190
util::changelog::update_release_api_version $CLIENT_VERSION $old_client_version $new_k8s_api_version
191+
else
192+
# Otherwise add a new section in the changelog
193+
util::changelog::update_release_api_version $CLIENT_VERSION $CLIENT_VERSION $new_k8s_api_version
191194
fi
192195
release_notes=$(util::kube_changelog::get_api_changelog "$KUBERNETES_BRANCH" "$old_k8s_api_version")
193196
if [[ -n "$release_notes" ]]; then

0 commit comments

Comments
 (0)