fold committing into adding changelog header script
[p5sagit/Distar.git] / helpers / changelog-context
diff --git a/helpers/changelog-context b/helpers/changelog-context
deleted file mode 100755 (executable)
index 5ab2115..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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";