Removed old git_branch() function, we're using tags now.
This commit is contained in:
parent
164513d0e6
commit
df77983a7c
3 changed files with 3 additions and 7 deletions
|
@ -290,7 +290,6 @@ MIG;
|
|||
tpl_add_function('csrf', true, 'csrf_html');
|
||||
|
||||
tpl_add_function('git_commit_hash');
|
||||
tpl_add_function('git_branch');
|
||||
tpl_add_function('git_tag');
|
||||
tpl_add_function('csrf_token');
|
||||
tpl_add_function('startup_time', false, function (float $time = MSZ_STARTUP) {
|
||||
|
|
|
@ -69,7 +69,9 @@ HTML;
|
|||
|
||||
$json = json_encode([
|
||||
'git' => [
|
||||
'branch' => git_branch(),
|
||||
// providing branch as tag still for now, can't be bothered to update the references
|
||||
'branch' => git_tag(),
|
||||
'tag' => git_tag(),
|
||||
'hash' => git_commit_hash(true),
|
||||
],
|
||||
'misuzu' => [
|
||||
|
|
|
@ -18,11 +18,6 @@ function git_commit_time(): int
|
|||
return strtotime(git_commit_info(MSZ_GIT_FORMAT_HASH_DATE_TIME));
|
||||
}
|
||||
|
||||
function git_branch(): string
|
||||
{
|
||||
return trim(shell_exec('git rev-parse --abbrev-ref HEAD'));
|
||||
}
|
||||
|
||||
function git_tag(): string
|
||||
{
|
||||
return trim(shell_exec('git describe --abbrev=0 --tags'));
|
||||
|
|
Loading…
Add table
Reference in a new issue