mirror of
https://github.com/pi-hole/web.git
synced 2026-05-27 11:05:08 +01:00
Show more detailed output if not on master
This commit is contained in:
+8
-6
@@ -6,26 +6,28 @@
|
||||
<div class="pull-right hidden-xs">
|
||||
<?php
|
||||
// Check if on a dev branch
|
||||
$piholeVersion = exec("cd /etc/.pihole/ && git rev-parse --abbrev-ref HEAD");
|
||||
$webVersion = exec("git rev-parse --abbrev-ref HEAD");
|
||||
$piholeBranch = exec("cd /etc/.pihole/ && git rev-parse --abbrev-ref HEAD");
|
||||
$webBranch = exec("git rev-parse --abbrev-ref HEAD");
|
||||
|
||||
// Use vDev if not on master
|
||||
if($piholeVersion !== "master") {
|
||||
if($piholeBranch !== "master") {
|
||||
$piholeVersion = "vDev";
|
||||
$piholeCommit = exec("cd /etc/.pihole/ && git describe --long --dirty --abbrev=10 --tags");
|
||||
}
|
||||
else {
|
||||
$piholeVersion = exec("cd /etc/.pihole/ && git describe --tags --abbrev=0");
|
||||
}
|
||||
|
||||
if($webVersion !== "master") {
|
||||
if($webBranch !== "master") {
|
||||
$webVersion = "vDev";
|
||||
$webCommit = exec("git describe --long --dirty --abbrev=10 --tags");
|
||||
}
|
||||
else {
|
||||
$webVersion = exec("git describe --tags --abbrev=0");
|
||||
}
|
||||
?>
|
||||
<b>Pi-hole Version </b> <span id="piholeVersion"><?php echo $piholeVersion; ?></span>
|
||||
<b>Web Interface Version </b> <span id="webVersion"><?php echo $webVersion; ?></span>
|
||||
<b>Pi-hole Version </b> <span id="piholeVersion"><?php echo $piholeVersion; ?></span><?php if(isset($piholeCommit)) { echo " (".$piholeBranch.", ".$piholeCommit.")"; } ?>
|
||||
<b>Web Interface Version </b> <span id="webVersion"><?php echo $webVersion; ?></span><?php if(isset($webCommit)) { echo " (".$webBranch.", ".$webCommit.")"; } ?>
|
||||
</div>
|
||||
<i class="fa fa-github"></i> <strong><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3J2L3Z4DHW9UY">Donate</a></strong> if you found this useful.
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user