Преглед изворни кода

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.
Ryan C. Gordon пре 3 година
родитељ
комит
98dfc9296a
1 измењених фајлова са 9 додато и 1 уклоњено
  1. 9 1
      build-scripts/fnsince.pl

+ 9 - 1
build-scripts/fnsince.pl

@@ -19,7 +19,15 @@ open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
 while (<PIPEFH>) {
     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;
     }
 
 }