Add glv.pl, adapt README.md

This commit is contained in:
2026-02-18 13:07:18 +01:00
parent 756cf88a6b
commit 1d8ac31e2f
2 changed files with 16 additions and 0 deletions

View File

@@ -3,6 +3,9 @@
C++ tool to obtain latest version number(s) of GitLab. It downloads the GitLab
Release notes file, and processes it using regular expressions.
As an alternative, you can also simply install the Perl script `glv.pl`
somewhere, and use that. It has the same functionality as the C++ tool.
## Dependencies
- [libscrequest](https://git.bobpolis.com/bob/libscrequest)

13
glv.pl Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env perl
my $all = $ARGV[0] =~ /^-a|--all$/ ? 1 : 0;
my @lines = `curl "https://gitlab.com/gitlab-org/gitlab-foss/-/raw/master/CHANGELOG.md" 2>/dev/null`;
foreach (@lines) {
if (/^##\s+(\d+\.\d+\.\d+)\s+\((\d+-\d+-\d+)/) {
print "$1 [$2]\n";
if (!$all) {
last;
}
}
}