From c65cc8cde30dd34a81962fda51a754f1cc0bdde8 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Fri, 19 Sep 2014 15:22:33 -0400 Subject: [PATCH] build: fix release name strings for gitian builds When building from a distdir as gitian does, checking for the .git dir is not reliable. Instead, ask git if we're in a repo. --- share/genbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/genbuild.sh b/share/genbuild.sh index 0800b31229..679566e596 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -16,7 +16,7 @@ fi DESC="" SUFFIX="" LAST_COMMIT_DATE="" -if [ -e "$(which git 2>/dev/null)" -a -d ".git" ]; then +if [ -e "$(which git 2>/dev/null)" -a $(git rev-parse --is-inside-work-tree 2>/dev/null) = "true" ]; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null