From 757eeccf5ccceacbb4e0aba8ef8e3d87512429a1 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 10 Jan 2023 13:09:10 -0600 Subject: [PATCH] fix changelog of first release of a new version gets the old major release --- doc/rpm-build/checkout-build-archives.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rpm-build/checkout-build-archives.php b/doc/rpm-build/checkout-build-archives.php index 91631baea1..ce7a37fc1d 100755 --- a/doc/rpm-build/checkout-build-archives.php +++ b/doc/rpm-build/checkout-build-archives.php @@ -925,7 +925,7 @@ function update_changelog($content) global $config; list($header) = explode("\n", $content); - $new_header = preg_replace('/\('.preg_quote($config['version']).'\.[0-9.]+[0-9](.*)\)/','('.$config['version'].'.'.$config['packaging'].'\\1)', $header); + $new_header = preg_replace('/\([0-9]+\.[0-9]+\.[0-9.]+[0-9](.*)\)/','('.$config['version'].'.'.$config['packaging'].'\\1)', $header); if (substr($config['changelog'],0,2) != ' ') $config['changelog'] = ' '.implode("\n ",explode("\n",$config['changelog'])); $content = $new_header."\n\n".$config['changelog']. "\n\n -- ".$config['changelog_packager'].' '.date('r')."\n\n".$content;