From 26184d5544a016af2fc80b17ac0afd377180754a Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Wed, 25 Aug 2021 12:18:27 -0400 Subject: [PATCH] replace old release if it is still a draft --- scripts/full-release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/full-release.sh b/scripts/full-release.sh index 80e4ccc..c525e7e 100755 --- a/scripts/full-release.sh +++ b/scripts/full-release.sh @@ -57,6 +57,9 @@ RAW_VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)" VERSION="v$RAW_VERSION" if [[ $DRY_RUN == false ]]; then + if [[ $(gh release list | grep -i "Draft" | grep -i "$VERSION" && echo "true" || echo "false") == "true" ]]; then + gh release delete --yes "$VERSION" + fi gh release create "$VERSION" --title "$VERSION" --draft "$BIN_PATH" "./steamguard-cli_$RAW_VERSION-0.deb" fi