From 2218331883117b07197229b650dd526ee6de50dd Mon Sep 17 00:00:00 2001 From: darealshinji Date: Sun, 29 Dec 2024 14:22:00 +0100 Subject: [PATCH] Update version.sh `git describe --tags` is required to get the correct version tag and the grep regex was changed to match the version pattern x.x.x. The pattern '\d.\d.\d' doesn't seem to work with GNU grep. --- tools/version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/version.sh b/tools/version.sh index 8df33e1755..3c073c3a3a 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -26,13 +26,13 @@ last_svn_revision=6962 last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be" git_revision=$(expr $last_svn_revision + $(git rev-list --count $last_svn_hash..HEAD)) -git_version_str=$(git describe --exact-match 2> /dev/null) +git_version_str=$(git describe --tags --exact-match 2> /dev/null) installer_version='0.0.0' resource_version='0, 0, 0' if test x$git_version_str != x; then git_version_str="${git_version_str##v}" tagged_release=1 - if [ $(echo $git_version_str | grep '\d\.\d\.\d') ]; then + if [ $(echo $git_version_str | grep '^[0-9]\.[0-9]\.[0-9]$') ]; then installer_version=$git_version_str resource_version=$(echo $git_version_str | sed 's/\./, /g') fi