Add GitID to the Dashboard with hyperlink to code changes.

Checks to see if MMDVMHost version output contains GitID (is longer than previous version). If so, break on the GitID, and insert a hyperlink to the code inside the compile date bracket.
This commit is contained in:
George Smart 2017-03-13 20:04:38 +00:00 committed by GitHub
parent 8a68552445
commit 960244b1ba

View file

@ -9,10 +9,10 @@ function getMMDVMHostVersion() {
return getMMDVMHostFileVersion();
} else {
showLapTime("getMMDVMHostVersion");
if (!startsWith(substr($output[0],31,8),"#")) {
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")";
if (strlen($output[0]) > 26) {
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion(). ", GitID #<a href=\"https://github.com/g4klx/MMDVMHost/commit/" . substr($output[0],32,7) . "\">" . substr($output[0],32,7) . "</a>)";
} else {
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().", GitID #<a href=\"https://github.com/g4klx/MMDVMHost/commit/".substr($output[0],32,7)."\">".substr($output[0],32,7)."</a>)";
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion(). ")";
}
}
}