Skip to content

Commit 2c04082

Browse files
committedNov 1, 2018
verify that projecta actually delivers a changelog
(cherry picked from commit a826c56)
1 parent bc8fe90 commit 2c04082

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
 

‎scripts/release.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ ($$)
166166
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" );
167167

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

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

‎scripts/update-news.pl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use File::Copy qw/copy/;
1616
use HTML::Entities qw/decode_entities/;
1717

18-
pod2usage(1) if @ARGV!=3;
18+
pod2usage(1) if @ARGV!=2;
1919

20-
my ($major,$minor,$releasename) = @ARGV;
20+
my ($version,$releasename) = @ARGV;
2121

2222

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

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

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

37+
die "Invalid changelog" unless $content =~ /^Changelog for QGIS/;
38+
3739
for $_ (split /\n/, $content) {
3840
next if /^Changelog /;
3941
next if /^------/;
@@ -68,6 +70,6 @@ =head1 NAME
6870
6971
=head1 SYNOPSIS
7072
71-
update-news.pl major minor releasename
73+
update-news.pl version releasename
7274
7375
=cut

0 commit comments

Comments
 (0)