File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,21 @@ jobs:
1919 run : |
2020 # Figure out tag name from branch name. This is coupled to the tag name generation that exists in .circleci/config.yml's `create-github-release` job.
2121 RELEASES=$(gh release list --repo="slackapi/slack-cli" --order="desc" --json="tagName" --exclude-drafts --exclude-pre-releases --limit=24 --jq ".[] | .tagName")
22+ RELEASE_FOUND=1
2223 for TAGS in $RELEASES; do
2324 TAG_NAME="${TAGS}-${{ github.event.ref }}"
2425 echo "Identified pre-release tagname to 🔪: $TAG_NAME"
2526
2627 # Delete the pre-release
2728 if GH_DEBUG=1 gh release --repo="slackapi/slack-cli" delete "$TAG_NAME" -y --cleanup-tag; then
2829 echo "Successfully deleted $TAG_NAME"
29- exit 0
30+ RELEASE_FOUND= 0
3031 else
3132 echo "Failed to find $TAG_NAME, trying next..."
3233 fi
34+ sleep 1
3335 done
34- echo "No matching pre-releases tag was found for the branch $TAG_NAME in recent versions"
35- exit 1
36+ if [ "$RELEASE_FOUND" -ne 0 ]; then
37+ echo "No matching pre-releases tag was found for the branch $TAG_NAME in recent versions"
38+ fi
39+ exit "$RELEASE_FOUND"
You can’t perform that action at this time.
0 commit comments