From a1c125c1f5af47e9d12c1195135b80ce90f8d096 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 10 Nov 2021 15:40:27 -0500 Subject: [PATCH] fnsince.pl: Report unreleased APIs as part of the next release version. This keep documentation future-accurate and more importantly: it will produce correct results before we tag the official release in git, so they'll be correct in the tag and the release tarball. --- 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 5c5632f9a..7b1d3b382 100755 --- a/build-scripts/fnsince.pl +++ b/build-scripts/fnsince.pl @@ -44,10 +44,18 @@ my @releases = sort { return 0; # still here? They matched completely?! } @unsorted_releases; +# this happens to work for how SDL versions things at the moment. +my $current_release = $releases[-1]; +my @current_release_segments = split /\./, $current_release; +@current_release_segments[2] = '' . ($current_release_segments[2] + 2); +my $next_release = join('.', @current_release_segments); + #print("\n\nSORTED\n"); #foreach (@releases) { # print "$_\n"; #} +#print("\nCURRENT RELEASE: $current_release\n"); +#print("NEXT RELEASE: $next_release\n\n"); push @releases, 'HEAD'; @@ -112,7 +120,7 @@ if (not defined $wikipath) { chdir($wikipath); foreach my $fn (keys %funcs) { my $revision = $funcs{$fn}; - $revision = 'git HEAD (in development, not in an official release yet)' if $revision eq 'HEAD'; + $revision = $next_release if $revision eq 'HEAD'; my $fname = "$fn.mediawiki"; if ( ! -f $fname ) { #print STDERR "No such file: $fname\n";