Skip to content

Commit 9a45713

Browse files
committed
provide a version string even if no commit hash is available
1 parent f9a391e commit 9a45713

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

version.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
INSTR="$1"
44

5+
FALLBACK_VERSION='0.2.0 no-git-info'
6+
57
case "$INSTR" in
68
get-vcs)
7-
git -C "$MESON_SOURCE_ROOT" describe --always --dirty
9+
git -C "$MESON_SOURCE_ROOT" describe --always --dirty || echo "$FALLBACK_VERSION"
810
;;
911
*)
1012
echo invalid arguments 1>&2

0 commit comments

Comments
 (0)