Version automatique

This commit is contained in:
2021-12-14 15:52:18 +01:00
parent 64a3c1ed3b
commit aef8c035b2
2 changed files with 21 additions and 4 deletions

View File

@ -40,6 +40,23 @@ Bonne lecture ! -->
<body class="is-preload">
<?php
class Version
{
public static function get()
{
$tag = trim(exec('git describe --tags --abbrev=0'));
return sprintf('%s', $tag);
}
}
// echo 'Version du site : ' . Version::get();
?>
<!-- En-tête -->
<section id="header">
<header>
@ -422,7 +439,7 @@ Bonne lecture ! -->
<li><a href="./ACTUALITÉ/">Actualité</a></li>
</ul>
<ul class="copyright">
<li><a href="https://git.adriencharbonneau.fr/Adrien/Site-internet" class="a_git"><img style="margin-right: .5rem; vertical-align: middle;" src="images/GIT.svg" width="25px" height="25px"><b>Version : </b><span class="git git_color1 blanc"> v1.3 </span><b> Branch : </b><span class="git git_color1 blanc"> master </span></a></li>
<li><a href="https://git.adriencharbonneau.fr/Adrien/Site-internet" class="a_git"><img style="margin-right: .5rem; vertical-align: middle;" src="images/GIT.svg" width="25px" height="25px"><b>Version : </b><span class="git git_color1 blanc"><?php Version::get(); ?></span><b> Branch : </b><span class="git git_color1 blanc"> master </span></a></li>
</ul>
</div>
</section>