use the std_version where applicable instead of matching to the git.
This commit is contained in:
parent
366e735ad8
commit
ca55bbdaed
@ -1764,12 +1764,14 @@ function get_site_info() {
|
|||||||
$site_name = get_config('system','sitename');
|
$site_name = get_config('system','sitename');
|
||||||
if(! get_config('system','hidden_version_siteinfo')) {
|
if(! get_config('system','hidden_version_siteinfo')) {
|
||||||
$version = RED_VERSION;
|
$version = RED_VERSION;
|
||||||
|
$tag = get_std_version();
|
||||||
|
|
||||||
if(@is_dir('.git') && function_exists('shell_exec')) {
|
if(@is_dir('.git') && function_exists('shell_exec')) {
|
||||||
$commit = trim( @shell_exec('git log -1 --format="%h"'));
|
$commit = trim( @shell_exec('git log -1 --format="%h"'));
|
||||||
if(! get_config('system','hidden_tag_siteinfo'))
|
// if(! get_config('system','hidden_tag_siteinfo'))
|
||||||
$tag = trim( @shell_exec('git describe --tags --abbrev=0'));
|
// $tag = trim( @shell_exec('git describe --tags --abbrev=0'));
|
||||||
else
|
// else
|
||||||
$tag = '';
|
// $tag = '';
|
||||||
}
|
}
|
||||||
if(! isset($commit) || strlen($commit) > 16)
|
if(! isset($commit) || strlen($commit) > 16)
|
||||||
$commit = '';
|
$commit = '';
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function siteinfo_init(&$a) {
|
function siteinfo_init(&$a) {
|
||||||
|
|
||||||
|
|
||||||
if (argv(1) === 'json') {
|
if (argv(1) === 'json') {
|
||||||
$data = get_site_info();
|
$data = get_site_info();
|
||||||
json_return_and_die($data);
|
json_return_and_die($data);
|
||||||
@ -17,7 +15,7 @@ function siteinfo_content(&$a) {
|
|||||||
$version = sprintf( t('Version %s'), RED_VERSION );
|
$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"');
|
$commit = @shell_exec('git log -1 --format="%h"');
|
||||||
$tag = @shell_exec('git describe --tags --abbrev=0');
|
$tag = get_std_version(); // @shell_exec('git describe --tags --abbrev=0');
|
||||||
}
|
}
|
||||||
if(! isset($commit) || strlen($commit) > 16)
|
if(! isset($commit) || strlen($commit) > 16)
|
||||||
$commit = '';
|
$commit = '';
|
||||||
|
Reference in New Issue
Block a user