diff --git a/generate_changelog.sh b/generate_changelog.sh index ea1d102..ac26daf 100755 --- a/generate_changelog.sh +++ b/generate_changelog.sh @@ -1,43 +1,44 @@ #!/bin/bash # Generate a changelog in markdown format set -e . config . version . utils.sh test -f changelog && mv -f changelog changelog.orig script=$releasetools/parse_changelogs.pl out=$releasetools/changelogs test -d $out && rm -rf $out mkdir -p $out cat $releasetools/tags.git | while read repo tag; do echo $repo checkout=$(findCheckout $repo) test -d $checkout || exit 1 cd $checkout cmd="git --no-pager log v$previousversion..$tag" if [ "$repo" = extra-cmake-modules ]; then ( echo '# Extra CMake Modules' ; $cmd ) | $script > $out/extra-cmake-modules.changes else ( head -n1 README.md ; $cmd ) | $script > $out/$repo.changes fi done cd $out echo "Changelog for KDE Frameworks $version" > $releasetools/changelog +echo >> $releasetools/changelog cat *.changes >> $releasetools/changelog echo "### Security information" >> $releasetools/changelog echo >> $releasetools/changelog echo "The released code has been GPG-signed using the following key:" >> $releasetools/changelog echo "pub rsa2048/58D0EE648A48B3BB 2016-09-05 David Faure " >> $releasetools/changelog echo "Primary key fingerprint: 53E6 B47B 45CE A3E0 D5B7 4577 58D0 EE64 8A48 B3BB" >> $releasetools/changelog echo "Done, now fix by hand:" echo "Remove 'revert X' and 'X'" echo "Remove fixes to unittests" diff --git a/parse_changelogs.pl b/parse_changelogs.pl index a0d8f41..6c3eb2f 100755 --- a/parse_changelogs.pl +++ b/parse_changelogs.pl @@ -1,162 +1,163 @@ #!/usr/bin/perl use strict; use warnings; my $in_headers = 0; my $in_log = 0; my $firstline; my $changelog; my $bugline; my $skip = 1; my $firstchange = 1; my $fwname; sub process_commit() { if (defined $firstline && !defined $changelog) { $skip = 1 if ($firstline =~ /coding style/i); $skip = 1 if ($firstline =~ /autotest/i); $skip = 1 if ($firstline =~ /unit ?test/i); $skip = 1 if ($firstline =~ /unit-test/i); $skip = 1 if ($firstline =~ /documentation/i); $skip = 1 if ($firstline =~ /fix test/i); $skip = 1 if ($firstline =~ /fix runtime warning/i); $skip = 1 if ($firstline =~ /clang warning/i); $skip = 1 if ($firstline =~ /--warning/i); $skip = 1 if ($firstline =~ /missing license/i); $skip = 1 if ($firstline =~ /^doc$/i); $skip = 1 if ($firstline =~ /^docu /i); $skip = 1 if ($firstline =~ /fix docs/i); $skip = 1 if ($firstline =~ /apidox/i); $skip = 1 if ($firstline =~ /pedantic/i); $skip = 1 if ($firstline =~ /fix build/i); $skip = 1 if ($firstline =~ /fix debug/i); $skip = 1 if ($firstline =~ /debug statement/i); $skip = 1 if ($firstline =~ /debug area/i); $skip = 1 if ($firstline =~ /debug output/i); $skip = 1 if ($firstline =~ /test executable/i); $skip = 1 if ($firstline =~ /test application/i); $skip = 1 if ($firstline =~ /test file/i); $skip = 1 if ($firstline =~ /^fix comment/i); $skip = 1 if ($firstline =~ /adjust comment/i); $skip = 1 if ($firstline =~ /^pedantic/i); $skip = 1 if ($firstline =~ /^compile\+\+/i); $skip = 1 if ($firstline =~ /^comment\+\+/i); $skip = 1 if ($firstline =~ /minor/i); $skip = 1 if ($firstline =~ /krazy/i); $skip = 1 if ($firstline =~ /arcconfig/i); $skip = 1 if ($firstline =~ /kf6 todo/i); $skip = 1 if ($firstline =~ /normalize signal/i); $skip = 1 if ($firstline =~ /bump version/i); $skip = 1 if ($firstline =~ /reorder variable/i); $skip = 1 if ($firstline =~ /update version number/i); $skip = 1 if ($firstline =~ /add missing file/i); $skip = 1 if ($firstline =~ /fix typo/i); $skip = 1 if ($firstline =~ /fix compil/i); $skip = 1 if ($firstline =~ /typo fix/i); $skip = 1 if ($firstline =~ /remove dead code/i); $skip = 1 if ($firstline =~ /gitignore/i); $skip = 1 if ($firstline =~ /^cleanup$/i); $skip = 1 if ($firstline =~ /code cleanup/i); $skip = 1 if ($firstline =~ /Clazy/i); $skip = 1 if ($firstline =~ /clang/i); $skip = 1 if ($firstline =~ /unused variable/i); $skip = 1 if ($firstline =~ /unused function/i); $skip = 1 if ($firstline =~ /^Merge remote-tracking branch/i); $skip = 1 if ($firstline =~ /QStringLiteral/i); $skip = 1 if ($firstline =~ /Prefer nullptr over/i); $skip = 1 if ($firstline =~ /nullptr everywhere/i); $skip = 1 if ($firstline =~ /new connect/i); $skip = 1 if ($firstline =~ /qstring optimization/i); $skip = 1 if ($firstline =~ /fix binding loop/i); $skip = 1 if ($firstline =~ /CompilerSettings change the policies/i); $skip = 1 if ($firstline =~ /Individually specify supported platforms/i); $skip = 1 if ($firstline =~ /Promote Android support/i); $skip = 1 if ($firstline =~ /Add FreeBSD/i); $skip = 1 if ($firstline =~ /Require CMake 3.0/i); $skip = 1 if ($firstline =~ /Q_DECL_OVERRIDE/i); $skip = 1 if ($firstline =~ /Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG/i); + $skip = 1 if ($firstline =~ /install QCH file with the public API dox/i); } if (!$skip) { if ($firstchange) { $firstchange = 0; print "##" . $fwname; print "\n"; } my $suffix = ""; if (defined $bugline) { $suffix = " (bug $bugline)"; } if (defined $changelog) { print "* " . $changelog . $suffix . "\n"; } elsif (defined $firstline) { print "* " . $firstline . $suffix . "\n"; } else { print "EMPTY COMMIT...\n"; } } # clear vars undef $firstline; undef $changelog; undef $bugline; $skip = 0; $in_headers = 1; } while (<>) { if (!defined $fwname) { $fwname = $_; } if (/^commit/) { # process previous commit process_commit(); } elsif (/^$/) { if ($in_headers) { $in_headers = 0; $in_log = 1; } else { $in_headers = 1; $in_log = 0; } } else { if ($in_log) { s/^ //; s/\.$//; # remove trailing dot chomp; if (!defined $firstline && !/^\s*$/) { $firstline = $_; } if (/CHANGELOG:/) { s/\s*CHANGELOG:\ *//; $changelog = $_; } if (/BUG:/) { s/.*BUG:\ *//; $bugline = $_; } $skip = 1 if (/SVN_SILENT/ || /GIT_SILENT/); $skip = 1 if (/Upgrade ECM and KF5 version/); $skip = 1 if (/Commit translations/); $skip = 1 if (/Upgrade KF5 version/); $skip = 1 if (/Upgrade ECM version/); $skip = 1 if (/Update ECM version/); $skip = 1 if (/Upgrade Qt5? version requirement/); $skip = 1 if (/Qt 5.5.0 is now required, as discussed on kde-frameworks-devel/); $skip = 1 if (/reviewboardrc/); $skip = 1 if (/Add verbose (?:|ecm )message (?:|for )when ECM (?:isn\'t|is not) found/i); } } } # process last commit process_commit(); if (!$firstchange) { print "\n"; }