From fb4054713aa0c8a3180ed5b4deb360282a88671e Mon Sep 17 00:00:00 2001 From: Adiel Cristo Date: Thu, 28 Jan 2021 21:15:35 -0300 Subject: [PATCH] Add commit ID to build info --- configure.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.php b/configure.php index 520e852232..2d12f54352 100755 --- a/configure.php +++ b/configure.php @@ -24,9 +24,8 @@ */ error_reporting(-1); -$cvs_id = '$Id$'; -echo "configure.php: $cvs_id\n"; +echo "configure.php\n"; function usage() // {{{ { @@ -230,6 +229,16 @@ function print_xml_errors($details = true) { libxml_clear_errors(); } // }}} +function get_commit_id() { + global $ac; + + if (is_file($file = $ac['LANGDIR'] . '/.git/refs/heads/master')) { + return trim(file_get_contents($file)); + } + + return '$Id$'; +} + $srcdir = dirname(__FILE__); $workdir = $srcdir; $basedir = $srcdir; @@ -506,6 +515,9 @@ function print_xml_errors($details = true) { } checkvalue("yes"); +checking("commit ID"); +checkvalue(get_commit_id()); + checking("for partial build"); checkvalue($ac['PARTIAL']);