Changed versioning system

This commit is contained in:
Marcin Kurczewski 2014-05-14 20:27:19 +02:00
parent 66039e56a6
commit 27ddf6f59f
5 changed files with 10 additions and 4 deletions

View file

@ -14,6 +14,7 @@ salt = "1A2/$_4xVa"
featuredPostMaxDays=7
debugQueries=0
logAnonymousUploads=1
githubLink = http://github.com/rr-/szurubooru
[help]
title=Help

View file

@ -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

View file

@ -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;

View file

@ -40,7 +40,11 @@ Assets::addScript('core.js');
<div class="main-wrapper">
<hr/>
<div class="left">
<span><a href="<?= SZURU_LINK ?>">szurubooru&nbsp;v<?= SZURU_VERSION ?></a></span>
<span>
<a href="<?= getConfig()->misc->githubLink ?>">
szurubooru&nbsp;<?= 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 ?>

View file

@ -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;