require running the smoker before non-trial releases
Jesse Luehrs [Mon, 3 Jan 2011 19:09:47 +0000 (13:09 -0600)]
dist.ini
inc/TestRelease.pm [new file with mode: 0644]

index 8292ea1..c952a7e 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -19,7 +19,7 @@ version = 1.9901
 [=inc::MakeMaker]
 [Manifest]
 
-[TestRelease]
+[=inc::TestRelease]
 [ConfirmRelease]
 [UploadToCPAN]
 
diff --git a/inc/TestRelease.pm b/inc/TestRelease.pm
new file mode 100644 (file)
index 0000000..d557757
--- /dev/null
@@ -0,0 +1,18 @@
+package inc::TestRelease;
+
+use Moose;
+
+extends 'Dist::Zilla::Plugin::TestRelease';
+
+around before_release => sub {
+    my $orig = shift;
+    my $self = shift;
+
+    local $ENV{MOOSE_TEST_MD} = $self->zilla->is_trial
+        ? $ENV{MOOSE_TEST_MD}
+        : 1;
+
+    $self->$orig(@_);
+};
+
+1;