File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 18
18
exit 1
19
19
fi
20
20
21
- DESC =" "
22
- SUFFIX =" "
21
+ GIT_TAG =" "
22
+ GIT_COMMIT =" "
23
23
if [ " ${BITCOIN_GENBUILD_NO_GIT} " != " 1" ] && [ -e " $( command -v git) " ] && [ " $( git rev-parse --is-inside-work-tree 2> /dev/null) " = " true" ]; then
24
24
# clean 'dirty' status of touched files that haven't been modified
25
25
git diff > /dev/null 2> /dev/null
26
26
27
27
# if latest commit is tagged and not dirty, then override using the tag name
28
28
RAWDESC=$( git describe --abbrev=0 2> /dev/null)
29
29
if [ " $( git rev-parse HEAD) " = " $( git rev-list -1 $RAWDESC 2> /dev/null) " ]; then
30
- git diff-index --quiet HEAD -- && DESC =$RAWDESC
30
+ git diff-index --quiet HEAD -- && GIT_TAG =$RAWDESC
31
31
fi
32
32
33
33
# otherwise generate suffix from git, i.e. string like "59887e8-dirty"
34
- SUFFIX =$( git rev-parse --short HEAD)
35
- git diff-index --quiet HEAD -- || SUFFIX =" $SUFFIX -dirty"
34
+ GIT_COMMIT =$( git rev-parse --short HEAD)
35
+ git diff-index --quiet HEAD -- || GIT_COMMIT =" $GIT_COMMIT -dirty"
36
36
fi
37
37
38
- if [ -n " $DESC " ]; then
39
- NEWINFO=" #define BUILD_DESC \" $DESC \" "
40
- elif [ -n " $SUFFIX " ]; then
41
- NEWINFO=" #define BUILD_SUFFIX $SUFFIX "
38
+ if [ -n " $GIT_TAG " ]; then
39
+ NEWINFO=" #define BUILD_DESC \" $GIT_TAG \" "
40
+ elif [ -n " $GIT_COMMIT " ]; then
41
+ NEWINFO=" #define BUILD_SUFFIX $GIT_COMMIT "
42
42
else
43
43
NEWINFO=" // No build information available"
44
44
fi
You can’t perform that action at this time.
0 commit comments