mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-29 13:31:28 +00:00
add support for custom version_static.txt for package maintainers
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
<?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) {
|
||||
$version = "UNKNOWN (Unsupported)";
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
$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;
|
||||
$output = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user