Stop emitting errors when there is no previous tag, use the first commit on the branch

This commit is contained in:
2026-01-18 11:06:21 -05:00
parent c41a6f24c6
commit 4122d97139

View File

@@ -13,7 +13,11 @@ REBUILDING=0
SHA1=$(git rev-parse HEAD)
TAG=$(git log --tags --simplify-by-decoration --pretty="format:%D" | grep -Eo "${VERSIONERS_TAGBASE},[0-9\.]+,[0-9]+" 2>/dev/null | head -n 1)
BUILD=0
if [[ "$TAG" != "" ]]; then
TAGSHA=$(git rev-list $TAG | head -n 1)
else
TAGSHA=$(git rev-list --max-parents=0 HEAD)
fi
CHANGELOG="$(git log --format="format:$LOGSPEC" ${TAGSHA}..HEAD)"
if [ "$TAG" == "" ]; then
BUILD=0