Skip to content

Commit 34065c2

Browse files
Add error handling code
1 parent a6202f4 commit 34065c2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

release_tools/version_tag.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ if ! git tag "$TAG_NAME" -s -m "Release $PROJECT_NAME version $VERSION_NUMBER."
5050
fi
5151

5252
REMOTE_NAME=$(git for-each-ref --format='%(upstream:remotename)' refs/heads/main)
53+
if [ -z "$REMOTE_NAME" ]; then
54+
REMOTE_NAME="origin"
55+
fi
5356

5457
echo
5558
echo "I have created tag $TAG_NAME. You can push it to GitHub like this:"

0 commit comments

Comments
 (0)