Skip to content

Commit 1d205a3

Browse files
authored
Merge pull request kubernetes-client#1593 from roycaihw/snapshot-api-version
Update Kubernetes API Version if we are generating a snapshot
2 parents 96b5c9b + ab54b6f commit 1d205a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ git commit -am "update version constants for $CLIENT_VERSION release"
180180
# TODO(roycaihw): not all Kubernetes API changes modify the OpenAPI spec.
181181
# Download the patch and skip if the spec is not modified. Also we want to
182182
# look at other k/k sections like "deprecation"
183+
if [[ $CLIENT_VERSION == *"snapshot"* ]]; then
184+
# Update "Kubernetes API Version" if we are generating a snapshot
185+
util::changelog::update_release_api_version $CLIENT_VERSION $old_client_version $new_k8s_api_version
186+
fi
183187
release_notes=$(util::kube_changelog::get_api_changelog "$KUBERNETES_BRANCH" "$old_k8s_api_version")
184188
if [[ -n "$release_notes" ]]; then
185189
util::changelog::write_changelog v$CLIENT_VERSION "### API Change" "$release_notes"
@@ -210,4 +214,4 @@ git diff-index --quiet --cached HEAD || git commit -m "generated API change"
210214
git add .
211215
git commit -m "generated client change"
212216

213-
echo "Release finished successfully. Please create a PR from branch ${newbranchuniq}."
217+
echo "Release finished successfully. Please create a PR from branch ${newbranchuniq}"

0 commit comments

Comments
 (0)