From 82232c6916ba6a657bbae524ada3c4ba21001156 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 11 Oct 2014 17:24:58 +0100 Subject: Show tag in siteinfo. Not useful for us, quite useful for admins. --- mod/siteinfo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index c1d65fadd..a58f17c53 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -88,8 +88,10 @@ function siteinfo_content(&$a) { if(! get_config('system','hidden_version_siteinfo')) { $version = sprintf( t('Version %s'), RED_VERSION ); - if(@is_dir('.git') && function_exists('shell_exec')) + if(@is_dir('.git') && function_exists('shell_exec')) { $commit = @shell_exec('git log -1 --format="%h"'); + $tag = @shell_exec('git describe --tags --abbrev=0'); + } if(! isset($commit) || strlen($commit) > 16) $commit = ''; } @@ -130,6 +132,7 @@ function siteinfo_content(&$a) { '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralized privacy enhanced websites.'), '$version' => $version, + '$tag' => $tag, '$commit' => $commit, '$web_location' => t('Running at web location') . ' ' . z_root(), '$visit' => t('Please visit GetZot.com to learn more about the Red Matrix.'), -- cgit v1.2.3