diff options
-rw-r--r-- | includes/functions.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/functions.php b/includes/functions.php index 38dda54..258ea97 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -12,10 +12,16 @@ function version(): string { function build(): string { if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.build")) { - return substr(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.build")), 0, 8); + $a = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.build")); } else { - return "dev"; + $a = "dev"; } + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild")) { + $b = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.prjbuild")); + } else { + $b = "testing"; + } + return "$a.$b"; } function getLetters(string $project): string { |