Skip to content

Commit d25449f

Browse files
committed
Merge #7522: Bugfix: Only use git for build info if the repository is actually the right one
ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
2 parents 0542978 + ed1fcdc commit d25449f

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ script: |
132132
export PATH=${WRAP_DIR}:${PATH}
133133
134134
# Create the release tarball using (arbitrarily) the first host
135+
export GIT_DIR="$PWD/.git"
135136
./autogen.sh
136137
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
137138
make dist

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ script: |
101101
export PATH=${WRAP_DIR}:${PATH}
102102
103103
# Create the release tarball using (arbitrarily) the first host
104+
export GIT_DIR="$PWD/.git"
104105
./autogen.sh
105106
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
106107
make dist

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ script: |
116116
export PATH=${WRAP_DIR}:${PATH}
117117
118118
# Create the release tarball using (arbitrarily) the first host
119+
export GIT_DIR="$PWD/.git"
119120
./autogen.sh
120121
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
121122
make dist

share/genbuild.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ else
1717
exit 1
1818
fi
1919

20+
git_check_in_repo() {
21+
! { git status --porcelain -uall --ignored "$@" 2>/dev/null || echo '??'; } | grep -q '?'
22+
}
23+
2024
DESC=""
2125
SUFFIX=""
22-
if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
26+
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" ] && git_check_in_repo share/genbuild.sh; then
2327
# clean 'dirty' status of touched files that haven't been modified
2428
git diff >/dev/null 2>/dev/null
2529

0 commit comments

Comments
 (0)