From 98dfc9296a35194da4aa8cdd187285f6b60159e8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 25 Oct 2022 14:03:32 -0400 Subject: [PATCH] build-scripts/fnsince.pl: Deal with new point-release system. This ignores 2.x.1 (etc) releases, which prevents it from thinking the next official non-point-release version is 2.26.1, when it should be 2.26.0, because it saw the "latest" release is 2.24.1. This fixes the wiki ending up with imaginary version numbers for the "this function is available since SDL 2.x.y" sections. Fixes #6343. --- build-scripts/fnsince.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build-scripts/fnsince.pl b/build-scripts/fnsince.pl index fde65c862..d49fa54e9 100755 --- a/build-scripts/fnsince.pl +++ b/build-scripts/fnsince.pl @@ -19,7 +19,15 @@ open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n"; while () { chomp; if (/\Arelease\-(.*?)\Z/) { - push @unsorted_releases, $1; + # After 2.24.x, ignore anything that isn't a x.y.0 release. + # We moved to bugfix-only point releases there, so make sure new APIs + # are assigned to the next minor version and ignore the patch versions. + my $ver = $1; + my @versplit = split /\./, $ver; + next if (scalar(@versplit) > 2) && (($versplit[0] > 2) || (($versplit[0] == 2) && ($versplit[1] >= 24))) && ($versplit[2] != 0); + + # Consider this release version. + push @unsorted_releases, $ver; } }