fix: version number check from git tag

This commit is contained in:
Victor Westerlund 2024-04-07 01:13:38 +02:00
parent 397484c5b4
commit b065c534bf

View file

@ -10,10 +10,10 @@
use Vegvisir\Path; use Vegvisir\Path;
// Get tags from local git folder // Get tags from local git folder
$dir = scandir(Path::root(".git/refs/tags"), SCANDIR_SORT_ASCENDING); $dir = scandir(Path::root(".git/refs/tags"));
// Get current version number from latest tag // Get current version number from latest tag
$version = $dir[2] ?? ""; $version = end($dir);
?> ?>
<a href="https://github.com/victorwesterlund/vlw.se/releases/<?= $version ?>"><?= $version ?></a> <a href="https://github.com/victorwesterlund/vlw.se/releases/<?= $version ?>"><?= $version ?></a>