From 6763e93a8d9dc51ea43f77833aba1b5156b3884d Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 17 Mar 2013 17:35:33 +0100 Subject: [PATCH] Obtain GIT information --- src/API/ServerAPI.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index 7729908f..5c729b7a 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -113,6 +113,11 @@ class ServerAPI{ self::$serverRequest = $this->server; $this->setProperty("server-id", $this->server->serverID); $this->server->api = $this; + if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information! + $sha1 = trim(file_get_contents(FILE_PATH.".git/refs/heads/master")); + console("[GIT] Commit \x1b[33m".$sha1); + } + if($this->getProperty("upnp-forwarding") === true){ console("[INFO] [UPnP] Trying to port forward..."); UPnP_PortForward($this->getProperty("port"));