Skip to content

Commit

Permalink
Show response text
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 15, 2023
1 parent a15a8ff commit 335f915
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,18 @@ jobs:
fi
echo "New tag is $NEW_TAG"
echo "Let's make sure this tag doesn't already exist..."
while true; do
echo "New tag is $NEW_TAG"
while i < 5; do
i=0
RESPONSE=$(curl -sl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/microsoft/CoseSignTool/releases/tags/$NEW_TAG)
echo "RESPONSE: $RESPONSE"
if [[ $RESPONSE == *"Not Found"* ]]; then
echo "Tag not found. We're good to go."
break
else
echo "Oops! That tag_TAG already exists!"
NEW_TAG="${NEW_TAG%-*}-pre$(( ${NEW_TAG##*-pre} + 1 ))" # Increment the prerelease number.
echo "Let's try $NEW_TAG"
i++
fi
done
Expand Down

0 comments on commit 335f915

Please sign in to comment.