use strictures 1;
use base qw(Exporter);
+use Config;
+
our @EXPORT = qw(
author manifest_include run_preflight
);
system("git fetch");
- for (scalar `make manifest 2>&1 >/dev/null`) {
- $_ && die "make manifest changed:\n$_ Go check it and retry";
+ my $make = $Config{make};
+
+ for (scalar `"$make" manifest 2>&1 >/dev/null`) {
+ $_ && die "$make manifest changed:\n$_ Go check it and retry";
}
for (scalar `git status`) {
+ /^# On branch master/ || die "Not on master. EEEK";
/Your branch is (behind|ahead of)/ && die "Not synced with upstream";
}
sub MY::postamble { <<'END'; }
preflight:
perl -IDistar/lib -MDistar -erun_preflight $(VERSION)
-upload: preflight $(DISTVNAME).tar$(SUFFIX)
+release: preflight
+ $(MAKE) disttest
+ rm -rf $(DISTVNAME)
+ $(MAKE) $(DISTVNAME).tar$(SUFFIX)
cpan-upload $(DISTVNAME).tar$(SUFFIX)
-release: upload
git commit -a -m "Release commit for $(VERSION)"
git tag v$(VERSION) -m "release v$(VERSION)"
git push --tags