Skip to content

Commit dc42010

Browse files
committed
build: Include tag name in release tarball for build.h
1 parent 7bbfd6b commit dc42010

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

contrib/guix/libexec/make_release_tarball.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ GIT_ARCHIVE="$1"
1414
DISTNAME="$2"
1515

1616
git archive --prefix="${DISTNAME}/" HEAD | tar -xp
17+
18+
# Generate correct build info file from git, before we lose git
19+
GIT_BUILD_INFO="$(share/genbuild.sh /dev/stdout)"
20+
sed 's/\/\/ No build information available/'"${GIT_BUILD_INFO}"'/' -i "${DISTNAME}/share/genbuild.sh"
21+
1722
cd "${DISTNAME}"
1823

1924
./autogen.sh

share/genbuild.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ if [ -n "$GIT_TAG" ]; then
4545
elif [ -n "$GIT_COMMIT" ]; then
4646
NEWINFO="#define BUILD_GIT_COMMIT \"$GIT_COMMIT\""
4747
else
48-
NEWINFO="// No build information available"
48+
# NOTE: The NEWINFO line below this comment gets replaced by a string-match in contrib/guix/libexec/make_release_tarball.sh
49+
# If changing it, update the script too!
50+
NEWINFO='// No build information available'
4951
fi
5052

5153
# only update build.h if necessary

0 commit comments

Comments
 (0)