blob: 1bf1062eba33c92f7070b4d3fd472280912f99c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php
namespace WebCore;
include "Metadata.php";
class Main {
public static function version(): string {
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")) {
return substr(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk"), 0, 8);
} else if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.version")) {
return substr(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.version"), 0, 8);
}
return "live";
}
}
|