Parcourir la source

Add branch check on docker image

causefx il y a 7 ans
Parent
commit
a7f474f87b
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      api/functions.php

+ 5 - 0
api/functions.php

@@ -26,6 +26,11 @@ if (isset($GLOBALS['dbLocation'])) {
 		$GLOBALS['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
 	upgradeCheck();
 }