mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Merge tag 'branch-0.13' into bugfix_gitdir
This commit is contained in:
@@ -15,23 +15,19 @@ fi
|
||||
|
||||
DESC=""
|
||||
SUFFIX=""
|
||||
LAST_COMMIT_DATE=""
|
||||
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
|
||||
|
||||
# if latest commit is tagged and not dirty, then override using the tag name
|
||||
RAWDESC=$(git describe --abbrev=0 2>/dev/null)
|
||||
if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC)" ]; then
|
||||
if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then
|
||||
git diff-index --quiet HEAD -- && DESC=$RAWDESC
|
||||
fi
|
||||
|
||||
# otherwise generate suffix from git, i.e. string like "59887e8-dirty"
|
||||
SUFFIX=$(git rev-parse --short HEAD)
|
||||
git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty"
|
||||
|
||||
# get a string like "2012-04-10 16:27:19 +0200"
|
||||
LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")"
|
||||
fi
|
||||
|
||||
if [ -n "$DESC" ]; then
|
||||
@@ -45,7 +41,4 @@ fi
|
||||
# only update build.h if necessary
|
||||
if [ "$INFO" != "$NEWINFO" ]; then
|
||||
echo "$NEWINFO" >"$FILE"
|
||||
if [ -n "$LAST_COMMIT_DATE" ]; then
|
||||
echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user