mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Assume version is vDev if not on master branch
This removes the need for a vDev tag, which was less reliable because it needed to be the most recent tag in the dev branch and was really just an sign that the repo was on a branch besides master.
This commit is contained in:
+14
-2
@@ -5,8 +5,20 @@
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<?php
|
||||
$piholeVersion = exec("cd /etc/.pihole/ && git describe --tags --abbrev=0");
|
||||
$webVersion = exec("git describe --tags --abbrev=0");
|
||||
// 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");
|
||||
|
||||
// Use vDev if not on master
|
||||
if($piholeVersion !== "master")
|
||||
$piholeVersion = "vDev";
|
||||
else
|
||||
$piholeVersion = exec("cd /etc/.pihole/ && git describe --tags --abbrev=0");
|
||||
|
||||
if($webVersion !== "master")
|
||||
$webVersion = "vDev";
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user