Merge branch 'get-version-git-on-windows' of tsimmons/tt-rss into master
This commit is contained in:
commit
da926067ab
|
@ -1889,9 +1889,7 @@
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
$root_dir = dirname(dirname(__FILE__));
|
$root_dir = dirname(dirname(__FILE__));
|
||||||
|
|
||||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
if (PHP_OS === "Darwin") {
|
||||||
$ttrss_version['version'] = "UNKNOWN (Unsupported, Windows)";
|
|
||||||
} else if (PHP_OS === "Darwin") {
|
|
||||||
$ttrss_version['version'] = "UNKNOWN (Unsupported, Darwin)";
|
$ttrss_version['version'] = "UNKNOWN (Unsupported, Darwin)";
|
||||||
} else if (file_exists("$root_dir/version_static.txt")) {
|
} else if (file_exists("$root_dir/version_static.txt")) {
|
||||||
$ttrss_version['version'] = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)";
|
$ttrss_version['version'] = trim(file_get_contents("$root_dir/version_static.txt")) . " (Unsupported)";
|
||||||
|
@ -1902,7 +1900,7 @@
|
||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
|
|
||||||
chdir($root_dir);
|
chdir($root_dir);
|
||||||
exec('git --no-pager log --pretty='.escapeshellarg('version: %ct %h').' -n1 HEAD 2>&1', $output, $rc);
|
exec('git --no-pager log --pretty="version: %ct %h" -n1 HEAD 2>&1', $output, $rc);
|
||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
|
|
||||||
if (is_array($output) && count($output) > 0) {
|
if (is_array($output) && count($output) > 0) {
|
||||||
|
|
Loading…
Reference in New Issue