for (scalar `git status`) {
/^# On branch master/ || die "Not on master. EEEK";
- /Your branch is (behind|ahead of)/ && die "Not synced with upstream";
+ /Your branch is behind|Your branch and .*? have diverged/ && die "Not synced with upstream";
}
for (scalar `git diff`) {
my @cached = grep /^\+/, `git diff --cached -U0`;
@cached > 0 or die "Please add:\n\n$ARGV[0] - $ymd\n\nto Changes and git add";
@cached == 2 or die "Pre-commit Changes not just Changes line";
- $cached[0] eq "+++ b/Changes\n" or die "Changes not changed";
+ $cached[0] =~ /^\+\+\+ .\/Changes\n/ or die "Changes not changed";
$cached[1] eq "+$ARGV[0] - $ymd\n" or die "Changes new line should be: \n\n$ARGV[0] - $ymd\n ";
}
-sub MY::postamble { <<'END'; }
+sub MY::postamble {
+ my $post = <<'END';
preflight:
perl -IDistar/lib -MDistar -erun_preflight $(VERSION)
release: preflight
pod2text $(VERSION_FROM) >$(DISTVNAME)/README
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-readme-to-manifest
END
+ if (open my $fh, '<', 'maint/Makefile.include') {
+ $post .= do { local $/; <$fh> };
+ }
+ return $post;
+}
{
no warnings 'redefine';