7 author manifest_include run_preflight
12 shift->export_to_level(1,@_);
15 sub author { our $Author = shift }
24 '' => qr{Changes|MANIFEST|README|META\.yml},
25 'maint' => qr{[^.].*},
28 sub manifest_include {
32 sub write_manifest_skip {
34 my @files = @Manifest;
36 while (my ($dir, $spec) = splice(@files, 0, 2)) {
37 my $re = ($dir ? $dir.'/' : '').
38 ((ref($spec) eq 'Regexp')
42 : die "spec must be string or regexp, was: ${spec} (${\ref $spec})");
45 my $final = '^(?!'.join('|', map "${_}\$", @parts).')';
46 open my $skip, '>', 'MANIFEST.SKIP';
47 print $skip "${final}\n";
54 for (scalar `git status`) {
55 /Your branch is (behind|ahead of)/ && die "Not synced with upstream";
58 for (scalar `git diff`) {
59 length && die "Oustanding changes";
61 my @cached = grep /^\+/, `git diff --cached -U0`;
62 @cached == 2 or die "Pre-commit Changes not just Changes line";
63 $cached[0] eq "+++ b/Changes\n" or die "Changes not changed";
65 "%i-%02i-%02i", (localtime)[5]+1900, (localtime)[4]+1, (localtime)[3]
67 $cached[1] eq "+$ARGV[0] - $ymd\n" or die "Changes new line should be: \n\n$ARGV[0] - $ymd\n ";
70 sub MY::postamble { <<'END'; }
72 perl -Idistar/lib -MDistar -erun_preflight $(VERSION)
73 upload: preflight disttest $(DISTVNAME).tar$(SUFFIX)
74 cpan-upload $(DISTVNAME).tar$(SUFFIX)
76 git commit -a -m "Release commit for $(VERSION)"
77 git tag release_$(VERSION)
81 readmefile: create_distdir
82 pod2text $(VERSION_FROM) >$(DISTVNAME)/README
86 no warnings 'redefine';
87 sub main::WriteMakefile {
89 ExtUtils::MakeMaker::WriteMakefile(
90 @_, AUTHOR => our $Author, ABSTRACT_FROM => $args{VERSION_FROM},
91 test => { TESTS => ($args{test}{TESTS}||'').' xt/*.t' },