release.sh: fix version matching

A commit_hash component was added to the version string:
"loop version 0.31.2-beta commit=v0.31.2-beta-dirty commit_hash=xxx".
As .* is greedy, it captured "0.31.2-beta commit=v0.31.2-beta-dirty"
instead of just "0.31.2-beta".

This commit fixes this.
This commit is contained in:
Boris Nagaev 2025-06-17 19:43:00 -03:00
parent e5751709d2
commit 7a4dbb751e
No known key found for this signature in database

View file

@ -37,7 +37,7 @@ else
LOOP_VERSION_OUTPUT=`./loopd-debug --version`
# Use a regex to isolate the version string.
LOOP_VERSION_REGEX="version (.+) "
LOOP_VERSION_REGEX="version ([^ ]+) "
if [[ $LOOP_VERSION_OUTPUT =~ $LOOP_VERSION_REGEX ]]; then
# Prepend 'v' to match git tag naming scheme.
LOOP_VERSION="v${BASH_REMATCH[1]}"