diff options
author | Ingo Klöcker <[email protected]> | 2025-02-21 10:12:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-02-21 10:13:19 +0000 |
commit | 542b6fce139047b5a0fa42ae11179a2308ac8f9e (patch) | |
tree | 7aab1070f12c38342d5a43f04c3227e4f50e00d6 | |
parent | gpgrt-config: Append default directory to PKG_CONFIG_PATH. (diff) | |
download | libgpg-error-542b6fce139047b5a0fa42ae11179a2308ac8f9e.tar.gz libgpg-error-542b6fce139047b5a0fa42ae11179a2308ac8f9e.zip |
Fix logic for finding the beta version number
* autogen.sh: Check if $tmp is empty after each assignment.
--
This fixes the problem that due to the gpg4win-5.0.0-beta103 tag
`./autogen.sh --find-version gpg4win 5 0 0` erroneously outputs
version 5.0.0 instead of 5.0.0-betaNNN.
Fix originally done for gpg4win and copied to gpgrt by [email protected]:
commit d3452493e665a4175218b7272ca8b1ca6fc57718
Author: Ingo Klöcker <[email protected]>
AuthorDate: Wed Feb 19 15:46:55 2025 +0100
-rwxr-xr-x | autogen.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2024-12-03 +# Version: 2025-02-21 configure_ac="configure.ac" @@ -264,13 +264,15 @@ if [ "$myhost" = "find-version" ]; then if [ -n "$tmp" ]; then tmp=$(echo "$tmp" | sed s/^"$package"// \ | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') - else + fi + if [ -z "$tmp" ]; then # (due tof "-base" in the tag we need to take the 4th field) tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null) if [ -n "$tmp" ]; then tmp=$(echo "$tmp" | sed s/^"$package"// \ | awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}') - elif [ -n "${matchstr3}" ]; then + fi + if [ -z "$tmp" -a -n "${matchstr3}" ]; then tmp=$(git describe --match "${matchstr3}" --long 2>/dev/null) if [ -n "$tmp" ]; then tmp=$(echo "$tmp" | sed s/^"$package"// \ |