There was an error while loading. Please reload this page.
1 parent 6d4233e commit 30d9443Copy full SHA for 30d9443
1 file changed
scripts/create_release.sh
@@ -9,10 +9,10 @@ set -o nounset
9
10
TAG="${TAG?}"
11
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}"
+# Delete the release if it already exists
+if gh release view "${TAG}" &>/dev/null; then
+ gh release delete "${TAG}" --cleanup-tag --yes 2>&1
+fi
16
17
gh release create "${TAG}" --title "${TAG}" --target main --latest=false \
18
--notes "The original release notes can be found [here](https://github.com/koalaman/shellcheck/releases/tag/${TAG})." \
0 commit comments