summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-19 13:33:09 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-21 13:43:20 +0100
commite1ca734edd17a90a325d5b566a4ea96e66c206e5 (patch)
treef19fe15b399dc22c6edfb0a542d4adb4953e8668 /tools
parentmeson-vcs-tag: add work-around for git bug (diff)
downloadsystemd-e1ca734edd17a90a325d5b566a4ea96e66c206e5.tar.xz
systemd-e1ca734edd17a90a325d5b566a4ea96e66c206e5.zip
meson: allow setting the version string during configuration
This will be useful when building distro packages, because we can set the version string to the rpm/dpkg/whatever version string, and getter reports from end users.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/meson-vcs-tag.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/meson-vcs-tag.sh b/tools/meson-vcs-tag.sh
index 4345c2145a..1eb7668eed 100755
--- a/tools/meson-vcs-tag.sh
+++ b/tools/meson-vcs-tag.sh
@@ -4,7 +4,13 @@ set -eu
set -o pipefail
dir="$1"
-fallback="$2"
+tag="$2"
+fallback="$3"
+
+if [ -n "$tag" ]; then
+ echo "$tag"
+ exit 0
+fi
# Apparently git describe has a bug where it always considers the work-tree
# dirty when invoked with --git-dir (even though 'git status' is happy). Work