We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f4716b1 + 0e620cd commit 3fea877Copy full SHA for 3fea877
1 file changed
version.sh
@@ -1,3 +1,4 @@
1
+#!/bin/bash
2
3
# version for configure, make dist and FW etc
4
# usage "version.sh dir"
@@ -11,7 +12,13 @@ else
11
12
fi
13
14
# get version from git tag
-GIT_TAG=`git describe --abbrev=4`
15
+GIT_TAG=`git describe --abbrev=4 2>/dev/null`
16
+
17
+# may fail to get git describe in some case, add this fallback to handle error
18
+if [[ "x$GIT_TAG" == "x" ]]
19
+then
20
+ GIT_TAG="v0.0-0-g0000"
21
+fi
22
23
# Some releases have a SOF_FW_XXX_ prefix on the tag and this prefix
24
# must be stripped for usage in version.h. i.e. we just need the number.
0 commit comments