Skip to content

Commit

Permalink
Handle not having any versions to remove (#1194)
Browse files Browse the repository at this point in the history
With the increase to 106 versions, it's totally conceivable there won't
be any versions to delete, so do it conditionally
  • Loading branch information
andrewpollock committed Apr 4, 2023
1 parent 705ce4b commit b06df59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gcp/appengine/cleanup_versions.sh
Expand Up @@ -19,4 +19,6 @@ VERSIONS="$(gcloud \
--format="value(version.id)" --sort-by="~version.createTime" \
| tail -n +106)"

gcloud --project=$PROJECT_ID app versions delete --service=default --quiet $VERSIONS
if [[ -n "$VERSIONS" ]]; then
gcloud --project=$PROJECT_ID app versions delete --service=default --quiet $VERSIONS
fi

0 comments on commit b06df59

Please sign in to comment.