1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Make bob builds show the full source git commit hash in buildinfo.

The Windows binaries, and both Windows and Unix source archives,
output from a bob build will now include the full SHA-1 of the source
git commit in their buildinfo (hence in all the About boxes and
command-line version output).

This will be occasionally useful to me at release time (there was that
one embarrassing incident where I managed not to notice that I'd made
a release build from entirely the wrong commit), but mostly, it just
seems like an obviously useful thing to put in a general buildinfo
section now that there is one.
This commit is contained in:
Simon Tatham
2017-01-21 14:55:53 +00:00
parent 7e14730b83
commit 5687a16fc1
5 changed files with 9 additions and 3 deletions

3
misc.c
View File

@ -1151,6 +1151,7 @@ int strendswith(const char *s, const char *t)
char *buildinfo(const char *newline)
{
strbuf *buf = strbuf_new();
extern const char commitid[]; /* in commitid.c */
strbuf_catf(buf, "Build platform: %d-bit %s",
(int)(CHAR_BIT * sizeof(void *)),
@ -1207,5 +1208,7 @@ char *buildinfo(const char *newline)
strbuf_catf(buf, "%sBuild option: DEBUG", newline);
#endif
strbuf_catf(buf, "%sSource commit: %s", newline, commitid);
return strbuf_to_str(buf);
}