Merge pull request #3782 from murrant/git-date

Add date to git version info
This commit is contained in:
Neil Lathwood
2016-07-07 19:09:15 +01:00
committed by GitHub
4 changed files with 14 additions and 5 deletions

View File

@@ -1038,7 +1038,9 @@ function version_info($remote=true) {
curl_setopt($api, CURLOPT_RETURNTRANSFER, 1);
$output['github'] = json_decode(curl_exec($api),true);
}
$output['local_sha'] = rtrim(`git rev-parse HEAD`);
list($local_sha, $local_date) = explode('|', rtrim(`git show --pretty='%H|%ci' -s HEAD`));
$output['local_sha'] = $local_sha;
$output['local_date'] = $local_date;
$output['local_branch'] = rtrim(`git rev-parse --abbrev-ref HEAD`);
$output['db_schema'] = dbFetchCell('SELECT version FROM dbSchema');