aboutsummaryrefslogtreecommitdiff
path: root/includes/functions.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-23 16:05:26 +0200
committerMinteck <contact@minteck.org>2022-04-23 16:05:26 +0200
commit76b96388dab0d8e70872731c086dbc83af89d353 (patch)
tree36e9510405eb693794f2cf795998f5f0bcbe1b29 /includes/functions.php
parent808ca160c1daaaa0b72ff9fa15035de39f070ea1 (diff)
downloadember-76b96388dab0d8e70872731c086dbc83af89d353.tar.gz
ember-76b96388dab0d8e70872731c086dbc83af89d353.tar.bz2
ember-76b96388dab0d8e70872731c086dbc83af89d353.zip
Add 'prjbuild' property to 'build()'
Diffstat (limited to 'includes/functions.php')
-rw-r--r--includes/functions.php10
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 {