From: Graham Knop Date: Sat, 5 Dec 2015 08:29:18 +0000 (-0500) Subject: split out checking for cpan-upload from preflight X-Git-Tag: v0.003000~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0780d0a15ec672591750fd67c19837824163691;p=p5sagit%2FDistar.git split out checking for cpan-upload from preflight --- diff --git a/helpers/preflight b/helpers/preflight index 1d38b13..2e7d75f 100755 --- a/helpers/preflight +++ b/helpers/preflight @@ -38,6 +38,3 @@ my @cached = grep /^\+/, `git diff --cached -U0`; @cached == 2 or die "All '$changelog' changes must be committed aside from version heading"; $cached[0] =~ /^\+\+\+ .\/\Q$changelog\E\n/ or die "$changelog not changed"; $cached[1] eq "+$changes_line" or die "$changelog new line should be: \n\n$changes_line "; - -{ no warnings 'exec'; `cpan-upload -h`; } -$? and die "cpan-upload not available"; diff --git a/lib/Distar.pm b/lib/Distar.pm index b702c80..2248b39 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -103,6 +103,7 @@ sub write_manifest_skip { preflight check-version check-manifest + check-cpan-upload releasetest release readmefile @@ -133,6 +134,7 @@ sub write_manifest_skip { REMAKE => join(' ', '$(PERLRUN)', 'Makefile.PL', map { $self->quote_literal($_) } @ARGV), BRANCH => $self->{BRANCH} ||= 'master', CHANGELOG => $self->{CHANGELOG} ||= 'Changes', + DEV_NULL_STDOUT => ($self->{DEV_NULL} ? '>'.File::Spec->devnull : ''), ); join('', @@ -141,12 +143,14 @@ sub write_manifest_skip { (map "$_ = $vars{$_}\n", sort keys %vars), <<'END', -preflight: check-version check-manifest +preflight: check-version check-manifest check-cpan-upload $(ABSPERLRUN) Distar/helpers/preflight $(VERSION) --changelog=$(CHANGELOG) --branch=$(BRANCH) check-version: $(ABSPERLRUN) Distar/helpers/check-version $(VERSION) $(TO_INST_PM) $(EXE_FILES) check-manifest: $(ABSPERLRUN) Distar/helpers/check-manifest +check-cpan-upload: + $(NOECHO) cpan-upload -h $(DEV_NULL_STDOUT) releasetest: $(MAKE) disttest RELEASE_TESTING=1 PASTHRU="$(PASTHRU) TEST_FILES=\"$(TEST_FILES)\"" release: preflight releasetest