summaryrefslogtreecommitdiffstats
path: root/version.sh
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-07-18 13:23:42 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-22 09:04:59 +0800
commit3c49b3fa6e6038fd226253e71cb082e09b4ff7a5 (patch)
treeed09dbb7aac6f7789ac70748421bb74b7b5f5737 /version.sh
parent5d955dcc4f9a699bc84fe25ff337d51103f845ac (diff)
downloadpetitboot-3c49b3fa6e6038fd226253e71cb082e09b4ff7a5.zip
petitboot-3c49b3fa6e6038fd226253e71cb082e09b4ff7a5.tar.gz
version.sh: Ensure we're using petitboot's git directory
We don't want the version to be extracted from a higher-level git directory. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'version.sh')
-rwxr-xr-xversion.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/version.sh b/version.sh
index 18981f6..4f6f861 100755
--- a/version.sh
+++ b/version.sh
@@ -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=''
OpenPOWER on IntegriCloud