From 98def36fc990c9e7aabfe680e685c5f19b54d58c Mon Sep 17 00:00:00 2001 From: kfcjew Date: Sun, 7 Jun 2020 21:58:02 +0300 Subject: [PATCH] Modify version output --- bootstrap.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 02c4a530..ec209b5b 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -120,8 +120,14 @@ return (function() { require __DIR__ . "/vendor/autoload.php"; setlocale(LC_TIME, "POSIX"); - - define("OPENVK_VERSION", "Altair Preview (Build 10)", false); + + $showCommitHash = true; # plz remove when release + if(is_dir($gitDir = OPENVK_ROOT . "/.git") && $showCommitHash) + $ver = "nightly-" . `git --git-dir="$gitDir" log --pretty="%h" -n1 HEAD`; + else + $ver = "Build 15"; + + define("OPENVK_VERSION", "Altair Preview ($ver)", false); define("OPENVK_DEFAULT_PER_PAGE", 10, false); define("__OPENVK_ERROR_CLOCK_IN_FUTURE", "Server clock error: FK1200-DTF", false); });