WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Commit 30d9443

Browse files
committed
chore: improve release detection
As suggested here: cli/cli#6964 (comment)
1 parent 6d4233e commit 30d9443

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/create_release.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ set -o nounset
99

1010
TAG="${TAG?}"
1111

12-
# First delete if release is there already
13-
# https://github.com/cli/cli/issues/6964
14-
output=$(gh release delete "${TAG}" --cleanup-tag --yes 2>&1) || [[ "${output}" == "release not found" ]]
15-
echo "${output}"
12+
# Delete the release if it already exists
13+
if gh release view "${TAG}" &>/dev/null; then
14+
gh release delete "${TAG}" --cleanup-tag --yes 2>&1
15+
fi
1616

1717
gh release create "${TAG}" --title "${TAG}" --target main --latest=false \
1818
--notes "The original release notes can be found [here](https://github.com/koalaman/shellcheck/releases/tag/${TAG})." \

0 commit comments

Comments
 (0)