aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 17:51:58 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2018-07-24 18:04:51 +0200
commit3ff76b02ce6339b0c915a0d40b832716b0b9005a (patch)
treecf2586ea4f37f715d2ecb34b07fd36542de8fec8
parentab2248e8c9e032d179825e0365327c0d4128320d (diff)
git-version-gen: Don't check for .git directory
This check is not in all our repos that use git-version-gen. Indeed it seems to be a leftover of openbsc where I think it wanted to ensure being called in the openbsc subfolder or something? libosmocore e.g. doesn't have it. In any case .git being a directory is not always true (if using git worktree) so remove this check. Change-Id: I976dd4ff20cc5b220b244b1fb6192c0528c32638
-rwxr-xr-xgit-version-gen4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-version-gen b/git-version-gen
index 8e59c5a..42cf3d2 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -92,8 +92,8 @@ fi
if test -n "$v"
then
: # use $v
-elif test -d ./.git \
- && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+elif
+ v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;