#631 closed enhancement (fixed)
Enhance banner to include git hash, ensure build info is current
| Reported by: | Jim Ursetto | Owned by: | felix winkelmann | 
|---|---|---|---|
| Priority: | not urgent at all | Milestone: | 4.9.0 | 
| Component: | unknown | Version: | 4.7.x | 
| Keywords: | Cc: | ||
| Estimated difficulty: | 
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.)
Attachments (3)
Change History (6)
Changed 14 years ago by
| Attachment: | 0001-Add-unit-build-version-with-build-branch-tag-and-ID-.patch added | 
|---|
Changed 14 years ago by
| Attachment: | 0002-Use-new-sys-build-version-variables-in-Unit-library.patch added | 
|---|
Changed 14 years ago by
| Attachment: | 0003-Remove-version.scm-and-references-to-C_BRANCH_NAME-a.patch added | 
|---|
comment:1 Changed 14 years ago by
| Owner: | set to felix winkelmann | 
|---|---|
| Status: | new → assigned | 
comment:2 Changed 14 years ago by
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 


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