|
|
@ -1,12 +1,18 @@
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* for package maintainers who don't use git: if version_static.txt exists in tt-rss root
|
|
|
|
|
|
|
|
directory, its contents are displayed instead of git commit-based version, this could be generated
|
|
|
|
|
|
|
|
based on source git tree commit used when creating the package */
|
|
|
|
|
|
|
|
|
|
|
|
function get_version(&$git_commit = false, &$git_timestamp = false) {
|
|
|
|
function get_version(&$git_commit = false, &$git_timestamp = false) {
|
|
|
|
$version = "UNKNOWN (Unsupported)";
|
|
|
|
$version = "UNKNOWN (Unsupported)";
|
|
|
|
|
|
|
|
|
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
$root_dir = dirname(dirname(__FILE__));
|
|
|
|
$root_dir = dirname(dirname(__FILE__));
|
|
|
|
|
|
|
|
|
|
|
|
if (is_dir("$root_dir/.git")) {
|
|
|
|
if (file_exists("$root_dir/version_static.txt")) {
|
|
|
|
|
|
|
|
$version = file_get_contents("$root_dir/version_static.txt") . " (Unsupported)";
|
|
|
|
|
|
|
|
} else if (is_dir("$root_dir/.git")) {
|
|
|
|
$rc = 0;
|
|
|
|
$rc = 0;
|
|
|
|
$output = [];
|
|
|
|
$output = [];
|
|
|
|
|
|
|
|
|
|
|
|