Commit 7894967e authored by Ryan McCormick's avatar Ryan McCormick Committed by GitHub
Browse files

fix: Set default 'latest' tag if git tags fail to get parsed (#118)

parent 0cd5d783
......@@ -27,6 +27,10 @@ current_tag=$(git describe --tags --exact-match 2>/dev/null | sed 's/^v//') || t
# Get latest TAG and add COMMIT_ID for dev
latest_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1 main) | sed 's/^v//') || true
if [[ -z ${latest_tag} ]]; then
latest_tag="0.0.1"
echo "No git release tag found, setting to unknown version: ${latest_tag}"
fi
# Use tag if available, otherwise use latest_tag.dev.commit_id
VERSION=v${current_tag:-$latest_tag.dev.$commit_id}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment