From 76b96388dab0d8e70872731c086dbc83af89d353 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 23 Apr 2022 16:05:26 +0200 Subject: Add 'prjbuild' property to 'build()' --- includes/functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'includes/functions.php') 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 { -- cgit