Remove VERSION and GIT_COMMIT constants

these are now lazily computed in VersionInfo as needed.
This commit is contained in:
Dylan K. Taylor
2020-07-25 19:17:33 +01:00
parent 2645b19617
commit 2c29634d03
10 changed files with 51 additions and 35 deletions

View File

@ -288,7 +288,7 @@ class Server{
}
public function getPocketMineVersion() : string{
return \pocketmine\VERSION;
return VersionInfo::getVersionObj()->getFullVersion(true);
}
public function getVersion() : string{
@ -1455,7 +1455,7 @@ class Server{
$report = false;
}
if(strrpos(\pocketmine\GIT_COMMIT, "-dirty") !== false or \pocketmine\GIT_COMMIT === str_repeat("00", 20)){
if(strrpos(VersionInfo::getGitHash(), "-dirty") !== false or VersionInfo::getGitHash() === str_repeat("00", 20)){
$this->logger->debug("Not sending crashdump due to locally modified");
$report = false; //Don't send crashdumps for locally modified builds
}