fix: version number check from git tag (#10)

This commit is contained in:
Victor Westerlund 2024-04-07 13:44:00 +00:00 committed by GitHub
parent 6ef024db6f
commit a82c853153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,10 +10,10 @@
use Vegvisir\Path;
// 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
$version = $dir[2] ?? "";
$version = end($dir);
?>
<a href="https://github.com/victorwesterlund/vlw.se/releases/<?= $version ?>"><?= $version ?></a>