--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings FATAL => 'all';
+
+my $version = shift or die "no version specified!";
+my $changelog = shift or die "no changelog file specified!";
+
+open my $fh, '<', $changelog
+ or die "can't open $changelog: $!";
+my $context;
+my $found_version;
+while (my $line = <$fh>) {
+ if ($found_version) {
+ last
+ if $line =~ /^\S/;
+ $context++;
+ }
+ elsif ($line =~ /^v?\Q$version\E/) {
+ $found_version = 1;
+ }
+}
+close $fh;
+die "couldn't find heading for $version!"
+ unless $found_version;
+
+print "$context\n";
cd $(DISTVNAME) && $(ABSPERLRUN) "-MExtUtils::Manifest=manicheck" -e "exit manicheck"
nextrelease:
$(ABSPERLRUN) Distar/helpers/add-changelog-heading $(VERSION) Changes
- git add -p Changes
+ GIT_DIFF_OPTS=-u`$(ABSPERLRUN) Distar/helpers/changelog-context $(VERSION) Changes` git add -p Changes
refresh:
cd Distar && git pull
rm Makefile