diff --git a/contrib/guix/libexec/make_release_tarball.sh b/contrib/guix/libexec/make_release_tarball.sh index f930b78e09..c99e6fb500 100755 --- a/contrib/guix/libexec/make_release_tarball.sh +++ b/contrib/guix/libexec/make_release_tarball.sh @@ -14,6 +14,11 @@ GIT_ARCHIVE="$1" DISTNAME="$2" git archive --prefix="${DISTNAME}/" HEAD | tar -xp + +# Generate correct build info file from git, before we lose git +GIT_BUILD_INFO="$(share/genbuild.sh /dev/stdout)" +sed 's/\/\/ No build information available/'"${GIT_BUILD_INFO}"'/' -i "${DISTNAME}/share/genbuild.sh" + cd "${DISTNAME}" ./autogen.sh diff --git a/share/genbuild.sh b/share/genbuild.sh index 26c1baa4a8..963113ae2c 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -45,7 +45,9 @@ if [ -n "$GIT_TAG" ]; then elif [ -n "$GIT_COMMIT" ]; then NEWINFO="#define BUILD_GIT_COMMIT \"$GIT_COMMIT\"" else - NEWINFO="// No build information available" + # NOTE: The NEWINFO line below this comment gets replaced by a string-match in contrib/guix/libexec/make_release_tarball.sh + # If changing it, update the script too! + NEWINFO='// No build information available' fi # only update build.h if necessary