From 15e79e5f77789577ab80178009f9d4805c36e795 Mon Sep 17 00:00:00 2001 From: Peter Hooper Date: Thu, 8 Aug 2024 13:30:54 +0100 Subject: [PATCH] fix get_latest_tag to use a default --- funcs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/funcs.sh b/funcs.sh index 978a347..92a0b34 100755 --- a/funcs.sh +++ b/funcs.sh @@ -113,6 +113,7 @@ is_skip_selected() { get_latest_tag() { git fetch --prune --unshallow --tags --force # This is needed - without it no tags are found. - latest_tag=$(git tag --list 'v*' --sort=-v:refname | head -n1) + maybe_latest_tag=$(git tag --list 'v*' --sort=-v:refname | head -n1) + latest_tag=${maybe_latest_tag:-0.0.0} echo "${latest_tag}" -} \ No newline at end of file +}