aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-02-12 05:36:55 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-02-12 05:38:01 +0000
commite98e3dde6a976a2c8f266ee963d6931fd4b37262 (patch)
tree09ad0be5d31b545c1edd0b552d4618a5753d8daa
parent41cced21063a89992ef393dda4fffc44ff60c7c3 (diff)
downloadbitcoin-e98e3dde6a976a2c8f266ee963d6931fd4b37262.tar.xz
Bugfix: Only use git for build info if the repository is actually the right one
Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml1
-rwxr-xr-xshare/genbuild.sh2
4 files changed, 4 insertions, 1 deletions
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index bba2104edb..ae36acfce6 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -70,6 +70,7 @@ script: |
done
# Create the release tarball using (arbitrarily) the first host
+ export GIT_DIR="$PWD/.git"
./autogen.sh
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index eb6df2096e..04453527f5 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -80,6 +80,7 @@ script: |
done
# Create the release tarball using (arbitrarily) the first host
+ export GIT_DIR="$PWD/.git"
./autogen.sh
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 97c823cde6..95caa984eb 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -73,6 +73,7 @@ script: |
done
# Create the release tarball using (arbitrarily) the first host
+ export GIT_DIR="$PWD/.git"
./autogen.sh
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
make dist
diff --git a/share/genbuild.sh b/share/genbuild.sh
index ffa89ca6e4..4965ef14cd 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 "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
+if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" -a -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" -a "$(git status --porcelain -u no --ignored "$0" | cut -b1)" != "?" ]; then
# clean 'dirty' status of touched files that haven't been modified
git diff >/dev/null 2>/dev/null