]>
git.wh0rd.org - tt-rss.git/blob - include/version.php
2 define('VERSION_STATIC', '1.15.3');
4 function get_version() {
5 date_default_timezone_set('UTC');
6 $root_dir = dirname(dirname(__FILE__
));
8 if (is_dir("$root_dir/.git") && file_exists("$root_dir/.git/refs/heads/master")) {
10 $suffix = substr(trim(file_get_contents("$root_dir/.git/refs/heads/master")), 0, 7);
11 $timestamp = filemtime("$root_dir/.git/refs/heads/master");
13 define("GIT_VERSION_HEAD", $suffix);
14 define("GIT_VERSION_TIMESTAMP", $timestamp);
16 return VERSION_STATIC
. ".$suffix";
18 return VERSION_STATIC
;
22 define('VERSION', get_version());