Changed versioning system
This commit is contained in:
parent
66039e56a6
commit
27ddf6f59f
5 changed files with 10 additions and 4 deletions
|
@ -14,6 +14,7 @@ salt = "1A2/$_4xVa"
|
|||
featuredPostMaxDays=7
|
||||
debugQueries=0
|
||||
logAnonymousUploads=1
|
||||
githubLink = http://github.com/rr-/szurubooru
|
||||
|
||||
[help]
|
||||
title=Help
|
||||
|
|
3
init.php
3
init.php
|
@ -26,6 +26,9 @@ function download($source, $destination = null)
|
|||
return $content;
|
||||
}
|
||||
|
||||
$version = exec('git describe --tags --always --dirty');
|
||||
$branch = exec('git rev-parse --abbrev-ref HEAD');
|
||||
PropertyModel::set(PropertyModel::EngineVersion, $version . '@' . $branch);
|
||||
|
||||
|
||||
//jQuery
|
||||
|
|
|
@ -10,6 +10,7 @@ final class PropertyModel implements IModel
|
|||
const DbVersion = 3;
|
||||
const PostSpaceUsage = 4;
|
||||
const PostSpaceUsageUnixTime = 5;
|
||||
const EngineVersion = 6;
|
||||
|
||||
static $allProperties;
|
||||
static $loaded;
|
||||
|
|
|
@ -40,7 +40,11 @@ Assets::addScript('core.js');
|
|||
<div class="main-wrapper">
|
||||
<hr/>
|
||||
<div class="left">
|
||||
<span><a href="<?= SZURU_LINK ?>">szurubooru v<?= SZURU_VERSION ?></a></span>
|
||||
<span>
|
||||
<a href="<?= getConfig()->misc->githubLink ?>">
|
||||
szurubooru <?= PropertyModel::get(PropertyModel::EngineVersion) ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php if (Access::check(new Privilege(Privilege::ListLogs))): ?>
|
||||
<span><a href="<?= \Chibi\Router::linkTo(['LogController', 'listView']) ?>">Logs</a></span>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<?php
|
||||
$startTime = microtime(true);
|
||||
|
||||
define('SZURU_VERSION', '0.7.1');
|
||||
define('SZURU_LINK', 'http://github.com/rr-/szurubooru');
|
||||
|
||||
//basic settings and preparation
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
$rootDir = __DIR__ . DS . '..' . DS;
|
||||
|
|
Loading…
Reference in a new issue