]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | define('VERSION_STATIC', '1.14'); | |
3 | ||
4 | function get_version() { | |
5 | date_default_timezone_set('UTC'); | |
6 | $root_dir = dirname(dirname(__FILE__)); | |
7 | ||
8 | if (is_dir("$root_dir/.git") && file_exists("$root_dir/.git/refs/heads/master")) { | |
9 | ||
10 | $suffix = substr(trim(file_get_contents("$root_dir/.git/refs/heads/master")), 0, 7); | |
11 | ||
12 | return VERSION_STATIC . ".$suffix"; | |
13 | } else { | |
14 | return VERSION_STATIC; | |
15 | } | |
16 | } | |
17 | ||
18 | define('VERSION', get_version()); | |
19 | ?> |