Handle new repos with no tags

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-03-01 11:48:47 +00:00
parent 758298694c
commit 0ab4e25456
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -26,7 +26,7 @@ done
SEMVER=$1
CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
CURRENT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
MAIN_BRANCH=$(git remote show origin 2>/dev/null|grep HEAD|sed 's/.* //')
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)