Summary

Enhance banner to include git hash, ensure build info is current

Metadata

Attachments

Description

The attached patches make the build tag, build branch, and build version available as ##sys#build-* variables in unit build-version, as well as the current build revision (git hash of HEAD). Furthermore, unit build-version is rebuilt with every make, ensuring that the versions are always current, even if you simply switch branches or make a small commit. Finally, unit library uses these new variables to generate the banner, and version.scm is removed.

I could rewrite this patch without unit build-version if desired, instead forcing library.scm to be rebuilt with every make. However, note there is a significant build time impact. For example, ckeen found that it takes almost 1 minute to build library.scm versus 2 seconds to build build-version.scm, which would happen in every single rebuild -- regardless of whether library.scm was actually modified.

This patch has been tested on OS X, Mingw (no msys), and OpenBSD.

I have also ensured that make buildhead and makedist.sh continue to work correctly. Furthermore, if you do not have git installed, or if you are not building from a git checkout, the information is simply omitted from the banner.

Comments on the implementation are appreciated.

(These commits are also available from https://github.com/ursetto/chicken-core-zb in branch zb/ver3.)

Changes and comments

[2011-07-02 23:44:09 UTC] zbigniew attached 0001-Add-unit-build-version-with-build-branch-tag-and-ID-.patch (description=#f)

[2011-07-02 23:44:21 UTC] zbigniew attached 0002-Use-new-sys-build-version-variables-in-Unit-library.patch (description=#f)

[2011-07-02 23:44:30 UTC] zbigniew attached 0003-Remove-version.scm-and-references-to-C_BRANCH_NAME-a.patch (description=#f)

[2011-07-03 12:06:28 UTC] felix changed status from new to assigned

[2011-07-03 12:06:28 UTC] felix set owner to felix

[2011-07-17 23:44:06 UTC] felix changed status from assigned to closed

[2011-07-17 23:44:06 UTC] felix set resolution to fixed

[2011-07-17 23:44:06 UTC] felix wrote:

It's hard to believe, but I finally managed to apply this patch. Thank you.

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0