vlw.se/public/about/version.php
Victor Westerlund 7f4b54685e feat(content): update texts and replace references to GitHub with Codeberg (#4)
This PR features a lot of text revisions, updated references to GitHub with Codeberg and more.

Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/4
Co-authored-by: Victor Westerlund <victor.vesterlund@gmail.com>
Co-committed-by: Victor Westerlund <victor.vesterlund@gmail.com>
2024-09-27 13:27:18 +00:00

17 lines
No EOL
531 B
PHP

<?php
/*
A pretty naive website version fetcher that assumes the latest git tag is the
version the website is currently displaying. The intent is that any live-master
of this website should always track the master branch and pull the latest HEAD
without any exceptions.
*/
// Get tags from local git folder
$dir = scandir(VV::root(".git/refs/tags"));
// Get current version number from latest tag
$version = end($dir);
?>
<a href="https://codeberg.org/vlw/vlw.se/releases/tag/<?= $version ?>"><?= $version ?></a>