Browse Source

Add branch check on docker image

causefx 7 years ago
parent
commit
a7f474f87b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      api/functions.php

+ 5 - 0
api/functions.php

@@ -26,6 +26,11 @@ if (isset($GLOBALS['dbLocation'])) {
 		$GLOBALS['uuid'] = $uuid;
 		$GLOBALS['uuid'] = $uuid;
 		updateConfig(array('uuid' => $uuid));
 		updateConfig(array('uuid' => $uuid));
 	}
 	}
+	if ($GLOBALS['docker']) {
+		$getBranch = file_get_contents(dirname(__DIR__, 1) . DIRECTORY_SEPARATOR . 'Docker.txt');
+		$getBranch = (empty($getBranch)) ? 'v2-master' : $getBranch;
+		$GLOBALS['branch'] = $getBranch;
+	}
 	//Upgrade Check
 	//Upgrade Check
 	upgradeCheck();
 	upgradeCheck();
 }
 }