This is an automated email from the git hooks/post-receive script.

abe pushed a commit to annotated tag 0.2.2-source
in repository libdist-zilla-role-bootstrap-perl.

commit ff1895d5b89262ba5d968f67e2092b703c21dc6e
Author: Kent Fredric <kentfred...@gmail.com>
Date:   Mon Oct 21 00:25:12 2013 +1300

    Add install_deps tool
---
 install_deps.pl | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/install_deps.pl b/install_deps.pl
new file mode 100644
index 0000000..4cffe5a
--- /dev/null
+++ b/install_deps.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use utf8;
+
+sub diag { print STDERR @_; print STDERR "\n" }
+sub env_exists { return exists $ENV{ $_[0] } }
+sub env_true { return env_exists( $_[0] ) and $ENV{ $_[0] } }
+
+sub safe_exec {
+  my ( $command, @params ) = @_;
+  diag("running $command @params");
+  my $exit = system( $command, @params );
+  if ( $exit != 0 ) {
+    warn "$command failed: $? $!";
+    exit $exit;
+  }
+  return 1;
+}
+
+if ( not env_exists('TRAVIS') ) {
+  diag('Is not running under travis!');
+  exit 1;
+}
+
+my (@params) = qw[ --quiet --notest --mirror http://cpan.metacpan.org/ 
--no-man-pages ];
+if ( env_true('DEVELOPER_DEPS') ) {
+  push @params, '--dev';
+}
+safe_exec( 'cpanm', @params, '--installdeps', '.' );
+if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
+  safe_exec( 'cpanm', @params, '--with-develop', '--installdeps', '.' );
+}
+
+exit 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-role-bootstrap-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to