Skip to content
Permalink
Browse files

verify that projecta actually delivers a changelog

(cherry picked from commit a826c56)
  • Loading branch information
jef-n committed Nov 1, 2018
1 parent bc8fe90 commit 2c040824933aacc35514f8e1f13bd19c72bf2037
Showing with 9 additions and 6 deletions.
  1. +2 −1 scripts/release.pl
  2. +7 −5 scripts/update-news.pl
@@ -166,7 +166,8 @@ ($$)
run( "perl -i -pe 's#<releases>#<releases>\n <release version=\"$newmajor.$newminor.$newpatch\" date=\"" . strftime("%Y-%m-%d", localtime) . "\" />#' linux/org.qgis.qgis.appdata.xml.in", "appdata update failed" );

unless( $dopoint ) {
run( "scripts/update-news.pl $newmajor $newminor '$newreleasename'", "could not update news" ) if $major>2 || ($major==2 && $minor>14);
my $v = ($doltr && ($major>3 || ($major==3 && $minor>=4))) ? "$newmajor.$newminor-LTR" : "$newmajor.$newminor.0";
run( "scripts/update-news.pl $v '$newreleasename'", "could not update news" ) if $major>2 || ($major==2 && $minor>14);

run( "git commit -n -a -m \"changelog and news update for $release\"", "could not commit changelog and news update" );

@@ -15,9 +15,9 @@
use File::Copy qw/copy/;
use HTML::Entities qw/decode_entities/;

pod2usage(1) if @ARGV!=3;
pod2usage(1) if @ARGV!=2;

my ($major,$minor,$releasename) = @ARGV;
my ($version,$releasename) = @ARGV;


my ($news,$tempfile) = tempfile();
@@ -28,12 +28,14 @@
last if /^Last Change/;
}

my $content = `curl -s http://changelog.qgis.org/en/qgis/version/$major.$minor.0/gnu/`;
my $content = `curl -s http://changelog.qgis.org/en/qgis/version/$version/gnu/`;
die "Couldn't get it!" unless defined $content;

print $news "\n= What's new in Version $major.$minor '$releasename'? =\n\n";
print $news "\n= What's new in Version $version '$releasename'? =\n\n";
print $news "This release has following new features:\n\n";

die "Invalid changelog" unless $content =~ /^Changelog for QGIS/;

for $_ (split /\n/, $content) {
next if /^Changelog /;
next if /^------/;
@@ -68,6 +70,6 @@ =head1 NAME
=head1 SYNOPSIS
update-news.pl major minor releasename
update-news.pl version releasename
=cut

0 comments on commit 2c04082

Please sign in to comment.
You can’t perform that action at this time.