From 29c2f6ac4ba11501a09bec79774fe4abdd5a5ade Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 28 Aug 2023 19:18:37 +0200 Subject: [PATCH] meson: Fix version script MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Apparently, the `|` has a higher priority… --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 910e06c783..6d0cddf7d8 100644 --- a/meson.build +++ b/meson.build @@ -1813,8 +1813,8 @@ version_tag = get_option('version-tag') if version_tag == '' and git.found() and fs.exists(project_source_root / '.git') # If the working tree has no tags (CI builds), the first git-describe will fail # and we fall back to project_version-commitid instead. - version_cmd = '''git -C "$1" describe --abbrev=7 --dirty=^ 2>/dev/null || - echo "$2-$(git -C "$1" describe --always --abbrev=7)" | + version_cmd = '''(git -C "$1" describe --abbrev=7 --dirty=^ 2>/dev/null || + echo "$2-$(git -C "$1" describe --always --abbrev=7)") | sed 's/^v//; s/-rc/~rc/' ''' else version_cmd = '''echo "$2" ''' -- 2.25.1