version.sh: Ensure we're using petitboot's git directory
authorJeremy Kerr <jk@ozlabs.org>
Fri, 18 Jul 2014 05:23:42 +0000 (13:23 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 22 Jul 2014 01:04:59 +0000 (09:04 +0800)
We don't want the version to be extracted from a higher-level git
directory.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
version.sh

index 18981f617b15b65654a6cb1d1d9de8f77eb72e86..4f6f8619502917ca8b4cd02b022cf49025272f08 100755 (executable)
@@ -5,6 +5,8 @@
 version=
 datefmt='%Y%m%d'
 
+export GIT_DIR=$(basename $0)/.git/
+
 if head=$(git rev-parse --short=8 --verify HEAD 2>/dev/null); then
 
        suffix=''