This is an automated email from the git hooks/post-receive script. abe pushed a commit to annotated tag 1.000000-source in repository libdist-zilla-role-bootstrap-perl.
commit 3449414c2ca55a43396b1418ed224f37ca84fac9 Author: Kent Fredric <kentfred...@gmail.com> Date: Sat Apr 5 17:47:08 2014 +1300 Nuke subtree --- maint-travis-ci/README.mkdn | 53 ----------- maint-travis-ci/before_script.pl | 31 ------- maint-travis-ci/install_deps.pl | 67 -------------- maint-travis-ci/lib/tools.pm | 173 ------------------------------------ maint-travis-ci/merge_travis_yml.pl | 31 ------- maint-travis-ci/report_fail_ctx.pl | 13 --- maint-travis-ci/script.pl | 41 --------- maint-travis-ci/sterilize_env.pl | 45 ---------- maint-travis-ci/sync_tree.pl | 27 ------ maint-travis-ci/yamls/sterile.mkdn | 54 ----------- maint-travis-ci/yamls/sterile.yaml | 41 --------- maint-travis-ci/yamls/sterile2.yaml | 44 --------- 12 files changed, 620 deletions(-) diff --git a/maint-travis-ci/README.mkdn b/maint-travis-ci/README.mkdn deleted file mode 100644 index 80d1add..0000000 --- a/maint-travis-ci/README.mkdn +++ /dev/null @@ -1,53 +0,0 @@ -# ABOUT - -This repository contains a directory full of utilities to bolt on -to CPAN-targeting distributions, to add useful `travis-ci` features to those dists. - -# PREREQS - -All that is needed at present to get started, is a copy of `git` that provides `git subtree`, and a copy of `Path::FindDev` from `CPAN`. - -You don't need `Path::FindDev` during deployment, its just used to streamline -automated patching. - -# INSTALLING - -First, check out a copy of these scripts, it can be a temporary directory, -and you'll only need to do this once. - -```shell -$ mkdir /tmp/tci-scripts -$ cd /tmp/tci-scripts -$ git clone https://github.com/kentfredric/travis-scripts.git -``` - -Then, chdir to the root of your project - -```shell -$ chdir $PROJECT -``` - -And lastly, execute the installer - -```shell -$ /tmp/tci-scripts/sync_tree.pl -``` - -This will create the folder called `maint-travis-ci` within your distribution, -with a tree installed by `git subtree`, which will track this distribution. - -To update your copy of `/maint-travis-ci` to the latest, simply execute - -```shell -$ $PROJECT/maint-travis-ci/sync_tree.pl -``` - -While somewhere in your project. - -# CAVEATS - -Note, this tool uses `Path::FindDev`, and by proxy, `Path::IsDev` to find a development -root directory somewhere in the ancestry of `$CWD`. - -As such, you will likely need to appease `Path::IsDev` by having a file of some description that -marks the root of the development tree. diff --git a/maint-travis-ci/before_script.pl b/maint-travis-ci/before_script.pl deleted file mode 100644 index f852b51..0000000 --- a/maint-travis-ci/before_script.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -if ( not env_exists('STERILIZE_ENV') ) { - diag("\e[31mSTERILIZE_ENV \e[32munset\e[0m, skipping"); - exit 0; -} -if ( env_is( 'TRAVIS_BRANCH', 'master' ) ) { - diag("before_script skipped, TRAVIS_BRANCH=master"); - exit 0; -} -else { - if ( -e './Build.PL' ) { - safe_exec( $^X, './Build.PL' ); - safe_exec("./Build"); - exit 0; - } - if ( -e './Makefile.PL' ) { - safe_exec( $^X, './Makefile.PL' ); - safe_exec("make"); - exit 0; - } - -} - diff --git a/maint-travis-ci/install_deps.pl b/maint-travis-ci/install_deps.pl deleted file mode 100644 index 58e2b22..0000000 --- a/maint-travis-ci/install_deps.pl +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use utf8; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -if ( not env_exists('TRAVIS') ) { - diag('Is not running under travis!'); - exit 1; -} -if ( not env_exists('STERILIZE_ENV') ) { - diag("\e[31STERILIZE_ENV is not set, skipping, because this is probably Travis's Default ( and unwanted ) target"); - exit 0; -} -if ( env_is( 'TRAVIS_BRANCH', 'master' ) and env_is( 'TRAVIS_PERL_VERSION', '5.8' ) ) { - diag("\e[31minstalldeps skipped on 5.8 on master, because \@Git, a dependency of \@Author::KENTNL, is unavailble on 5.8\e[0m"); - exit 0; -} -my (@params) = qw[ --quiet --notest --mirror http://cpan.metacpan.org/ --no-man-pages ]; -if ( env_true('DEVELOPER_DEPS') ) { - push @params, '--dev'; -} -if ( env_is( 'TRAVIS_BRANCH', 'master' ) ) { - cpanm( @params, 'Dist::Zilla', 'Capture::Tiny', 'Pod::Weaver' ); - cpanm( @params, '--dev', 'Dist::Zilla~>5.002', 'Pod::Weaver' ); - safe_exec( 'git', 'config', '--global', 'user.email', 'kentfredric+travi...@gmail.com' ); - safe_exec( 'git', 'config', '--global', 'user.name', 'Travis CI ( On behalf of Kent Fredric )' ); - - my $stdout = capture_stdout { - safe_exec( 'dzil', 'authordeps', '--missing' ); - }; - - if ( $stdout !~ /^\s*$/msx ) { - cpanm( @params, split /\n/, $stdout ); - } - $stdout = capture_stdout { - safe_exec( 'dzil', 'listdeps', '--missing' ); - }; - - if ( $stdout !~ /^\s*$/msx ) { - cpanm( @params, split /\n/, $stdout ); - } -} -else { - cpanm( @params, '--installdeps', '.' ); - if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) { - my $prereqs = parse_meta_json()->effective_prereqs; - my $reqs = $prereqs->requirements_for( 'develop', 'requires' ); - my @wanted; - - for my $want ( $reqs->required_modules ) { - my $module_requirement = $reqs->requirements_for_module($want); - if ( $module_requirement =~ /^\d/ ) { - push @wanted, $want . '~>=' . $module_requirement; - next; - } - push @wanted, $want . '~' . $module_requirement; - } - cpanm( @params, @wanted ); - - } -} - -exit 0; diff --git a/maint-travis-ci/lib/tools.pm b/maint-travis-ci/lib/tools.pm deleted file mode 100644 index 0da1620..0000000 --- a/maint-travis-ci/lib/tools.pm +++ /dev/null @@ -1,173 +0,0 @@ -use strict; -use warnings; - -package tools; - -use Cwd qw(cwd); -use Config; - -sub diag { - my $handle = \*STDERR; - for (@_) { - print {$handle} $_; - } - print {$handle} "\n"; -} - -sub env_exists { - return exists $ENV{ $_[0] }; -} - -sub env_true { - return ( env_exists( $_[0] ) and $ENV{ $_[0] } ); -} -sub env_is { return ( env_exists( $_[0] ) and $ENV{ $_[0] } eq $_[1] ) } - -sub safe_exec_nonfatal { - my ( $command, @params ) = @_; - diag("running $command @params"); - my $exit = system( $command, @params ); - if ( $exit != 0 ) { - my $low = $exit & 0b11111111; - my $high = $exit >> 8; - warn "$command failed: $? $! and exit = $high , flags = $low"; - if ( $high != 0 ) { - return $high; - } - else { - return 1; - } - - } - return 0; -} - -sub safe_exec { - my ( $command, @params ) = @_; - my $exit_code = safe_exec_nonfatal( $command, @params ); - if ( $exit_code != 0 ) { - exit $exit_code; - } - return 1; -} - -sub cpanm { - my (@params) = @_; - my $exit_code = safe_exec_nonfatal( 'cpanm', @params ); - if ( $exit_code != 0 ) { - safe_exec( 'tail', '-n', '200', '/home/travis/.cpanm/build.log' ); - exit $exit_code; - } - return 1; -} - -sub git { - my (@params) = @_; - safe_exec( 'git', @params ); -} - -my $got_fixes; - -sub get_fixes { - return if $got_fixes; - my $cwd = cwd(); - chdir '/tmp'; - safe_exec( 'git', 'clone', 'https://github.com/kentfredric/cpan-fixes.git' ); - chdir $cwd; - $got_fixes = 1; -} - -my $got_sterile; - -sub get_sterile { - return if $got_sterile; - my $cwd = cwd(); - chdir '/tmp'; - my $version = $]; - safe_exec( - 'git', 'clone', '--depth=1', - '--branch=' . $version, - 'https://github.com/kentfredric/perl5-sterile.git', - 'perl5-sterile' - ); - chdir $cwd; - $got_sterile = 1; -} -my $fixed_up; - -sub fixup_sterile { - return if $fixed_up; - get_sterile(); - my $cwd = cwd(); - chdir '/tmp/perl5-sterile'; - safe_exec( 'bash', 'patch_fixlist.sh', '/home/travis/perl5/perlbrew/perls/' . $ENV{TRAVIS_PERL_VERSION} ); - chdir $cwd; - $fixed_up = 1; -} -my $sterile_deployed; - -sub deploy_sterile { - return if $sterile_deployed; - fixup_sterile(); - for my $key ( keys %Config ) { - next unless $key =~ /(lib|arch)exp$/; - my $value = $Config{$key}; - next unless defined $value; - next unless length $value; - my $clean_path = '/tmp/perl5-sterile/' . $key; - diag("\e[32m?$clean_path\e[0m"); - if ( -e $clean_path and -d $clean_path ) { - diag("\e[31mRsyncing over $value\e[0m"); - $clean_path =~ s{/?$}{/}; - $value =~ s{/?$}{/}; - safe_exec( 'rsync', '-a', '--delete-delay', $clean_path, $value ); - } - } -} - -sub cpanm_fix { - my (@params) = @_; - get_fixes(); - my $cwd = cwd(); - chdir '/tmp/cpan-fixes'; - cpanm(@params); - chdir $cwd; -} - -sub parse_meta_json { - $_[0] ||= 'META.json'; - require CPAN::Meta; - return CPAN::Meta->load_file( $_[0] ); -} - -sub capture_stdout(&) { - require Capture::Tiny; - goto &Capture::Tiny::capture_stdout; -} - -sub import { - my ( $self, @args ) = @_; - - my $caller = [caller]->[0]; - - my $caller_stash = do { - no strict 'refs'; - *{ $caller . '::' }; - }; - - $caller_stash->{diag} = *diag; - $caller_stash->{env_exists} = *env_exists; - $caller_stash->{env_true} = *env_true; - $caller_stash->{env_is} = *env_is; - $caller_stash->{safe_exec_nonfatal} = *safe_exec_nonfatal; - $caller_stash->{safe_exec} = *safe_exec; - $caller_stash->{cpanm} = *cpanm; - $caller_stash->{git} = *git; - $caller_stash->{get_fixes} = *get_fixes; - $caller_stash->{cpanm_fix} = *cpanm_fix; - $caller_stash->{parse_meta_json} = *parse_meta_json; - $caller_stash->{capture_stdout} = *capture_stdout; - $caller_stash->{deploy_sterile} = *deploy_sterile; -} - -1; diff --git a/maint-travis-ci/merge_travis_yml.pl b/maint-travis-ci/merge_travis_yml.pl deleted file mode 100644 index 3dd5ae6..0000000 --- a/maint-travis-ci/merge_travis_yml.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use utf8; - -use Path::FindDev qw( find_dev ); - -my $hashref = {}; - -my $template = find_dev('./')->child('.travis-template.yml'); -my $target = find_dev('./')->child('.travis.yml'); - -if ( -f -e $template ) { - require YAML::Loader; - my $loader = YAML::Loader->new(); - $hashref = $loader->load( $template->slurp ); -} - -if ( not exists $hashref->{language} ) { - $hashref->{language} = 'perl'; -} -if ( not exists $hashref->{perl} ) { - $hashref->{perl} = [ '5.18', '5.19' ]; -} - -use Data::Dump qw(pp); -pp($hashref); -require YAML::Dumper; -my $dumper = YAML::Dumper->new(); -$target->spew( $dumper->dump($hashref) ); diff --git a/maint-travis-ci/report_fail_ctx.pl b/maint-travis-ci/report_fail_ctx.pl deleted file mode 100644 index 29b8e21..0000000 --- a/maint-travis-ci/report_fail_ctx.pl +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use utf8; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -diag("\e[31mLast 1000 lines of cpanm build log\e[0m"); -safe_exec( 'tail', '-n', '1000', $ENV{HOME} . '/.cpanm/build.log' ); - diff --git a/maint-travis-ci/script.pl b/maint-travis-ci/script.pl deleted file mode 100644 index 67ae282..0000000 --- a/maint-travis-ci/script.pl +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use utf8; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -if ( not env_exists('TRAVIS') ) { - diag('Is not running under travis!'); - exit 1; -} -if ( not env_exists('STERILIZE_ENV') ) { - diag("\e[31mSTERILIZE_ENV is not set, skipping, because this is probably Travis's Default ( and unwanted ) target"); - exit 0; -} -if ( env_is( 'TRAVIS_BRANCH', 'master' ) and env_is( 'TRAVIS_PERL_VERSION', '5.8' ) ) { - diag("\e[31mscript skipped on 5.8 on master\e[32m, because \@Git, a dependency of \@Author::KENTNL, is unavailble on 5.8\e[0m"); - exit 0; -} -if ( env_is( 'TRAVIS_BRANCH', 'master' ) ) { - my $xtest = safe_exec_nonfatal( 'dzil', 'xtest' ); - my $test = safe_exec_nonfatal( 'dzil', 'test' ); - if ( $test != 0 ) { - exit $test; - } - if ( $xtest != 0 ) { - exit $xtest; - } - exit 0; -} -else { - my @paths = './t'; - - if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) { - push @paths, './xt'; - } - safe_exec( 'prove', '--blib', '--shuffle', '--color', '--recurse', '--timer', '--jobs', 30, @paths ); -} diff --git a/maint-travis-ci/sterilize_env.pl b/maint-travis-ci/sterilize_env.pl deleted file mode 100644 index 0d51e86..0000000 --- a/maint-travis-ci/sterilize_env.pl +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -my $corelists = "$FindBin::Bin/corelist-data"; - -sub no_sterile_warning { - if ( env_is( 'TRAVIS_PERL_VERSION', '5.8' ) - or env_is( 'TRAVIS_PERL_VERSION', '5.10' ) ) - { - diag("\e[31m TREE STERILIZATION IMPOSSIBLE <= 5.10\e[0m"); - diag("\e[32m ... because prior to 5.11.*, dual-life installed to \e[33mprivlib\e[0m"); - diag("\e[32m ... because prior to 5.11.*, \e[33m\@INC\e[32m order was \e[33mprivlib,sitelib\e[0m"); - diag("\e[32m ... whereas after to 5.11.*, \e[33m\@INC\e[32m order is \e[33msitelib,privlib\e[0m"); - diag("\e[32m ... and now most dual-life things simply install to \e[33msitelib\e[0m"); - diag("\e[34m ( However, there are still a few naughty CPAN modules that install to \e[33mprivlib\e[34m )"); - diag( - "\e[32m but the net effect of this is that installing \e[33mModule::Build 0.4007\e[32m which pulls \e[33mPerl::OSType\e[0m" - ); - diag("\e[32m and results in \e[33mPerl::OSType\e[32m being later removed \e[0m"); - diag("\e[32m leaving behind a broken \e[33mModule::Build 0.4007\e[32m\e[0m"); - diag("\e[34m Set \e[35m MAYBE_BREAK_MODULE_BUILD=1\e[34m if this is ok\e[0m"); - exit 0 unless env_true('MAYBE_BREAK_MODULE_BUILD'); - diag("\e[35m PROCEEDING\e[0m"); - } -} -if ( not env_exists('STERILIZE_ENV') ) { - diag("\e[31STERILIZE_ENV is not set, skipping, because this is probably Travis's Default ( and unwanted ) target"); - exit 0; -} -if ( not env_true('STERILIZE_ENV') ) { - diag('STERILIZE_ENV unset or false, not sterilizing'); - exit 0; -} - -if ( not env_true('TRAVIS') ) { - diag('Is not running under travis!'); - exit 1; -} - -deploy_sterile(); diff --git a/maint-travis-ci/sync_tree.pl b/maint-travis-ci/sync_tree.pl deleted file mode 100755 index a9d60fa..0000000 --- a/maint-travis-ci/sync_tree.pl +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -use FindBin; -use lib "$FindBin::Bin/lib"; -use tools; - -use Path::FindDev qw( find_dev ); -my $root = find_dev('./'); - -chdir "$root"; - -sub git_subtree { - safe_exec( 'git', 'subtree', @_ ); -} - -my $travis = 'https://github.com/kentfredric/travis-scripts.git'; -my $prefix = 'maint-travis-ci'; - -if ( not -d -e $root->child($prefix) ) { - git_subtree( 'add', '--prefix=' . $prefix, $travis, 'master' ); -} -else { - git_subtree( 'pull', '-m', 'Synchronise git subtree maint-travis-ci', '--prefix=' . $prefix, $travis, 'master' ); -} - diff --git a/maint-travis-ci/yamls/sterile.mkdn b/maint-travis-ci/yamls/sterile.mkdn deleted file mode 100644 index 2091483..0000000 --- a/maint-travis-ci/yamls/sterile.mkdn +++ /dev/null @@ -1,54 +0,0 @@ -## ABOUT - - sterile.yaml - -## Tests - -### Version conformance tests - -Every version of Perl that can be tested on travis is tested. - - - perl: <V> - env: STERILIZE_ENV=0 - -This is to test simply that the code works on that platform - -### Installable tests - -This tests both the maximum and minimum perls on travis to ensure -that: - - a. All dependencies are installable on all versions of Perl - b. No dependencies are inherently required by the code which are not specified. - - - perl: <V> - env: STERILIZE_ENV=1 - -Tree sterilization occurs here to ensure that only the versions of things -that are provided by that version of perl exists prior to installing dependencies. - -### Pending upstream breakage - -This tests that of all the listed direct dependencies, that the code works as expected -after upgrading to the latest version of all direct dependencies. - -Presently this only runs on the newest `perl` on travis, because it is seemed that -if "-dev" versions are going to be a problem, they'll exhibit the same problems on all perls. - -Tree sterilization is not performed here, though may be in future, because that will reveal breakages -between downstream dependencies. - - - perl: <V> - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1 - -### Author Testing - -This is the most dependency expensive method, as this mode pulls in all dependencies -listed in `develop.requires`, and additionally runs `xt/*` - -This is presently only performed on the latest perl due to the time expensiveness -of this, requiring significantly more dependencies to perform tests. - - - perl: <V> - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1 - diff --git a/maint-travis-ci/yamls/sterile.yaml b/maint-travis-ci/yamls/sterile.yaml deleted file mode 100644 index 6f29405..0000000 --- a/maint-travis-ci/yamls/sterile.yaml +++ /dev/null @@ -1,41 +0,0 @@ -language: perl -matrix: - include: - - perl: "5.8" - env: STERILIZE_ENV=0 - - perl: "5.10" - env: STERILIZE_ENV=0 - - perl: "5.12" - env: STERILIZE_ENV=0 - - perl: "5.14" - env: STERILIZE_ENV=0 - - perl: "5.16" - env: STERILIZE_ENV=0 - - perl: "5.18" - env: STERILIZE_ENV=0 - - perl: "5.19" - env: STERILIZE_ENV=0 - - perl: "5.12" - env: STERILIZE_ENV=1 - - perl: "5.19" - env: STERILIZE_ENV=1 - - perl: "5.19" - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1 - - perl: "5.19" - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1 -before_install: - - perlbrew list - - time perl ./maint-travis-ci/sterilize_env.pl -install: - - time perl ./maint-travis-ci/install_deps.pl -before_script: - - time perl ./maint-travis-ci/before_script.pl -script: - - time perl ./maint-travis-ci/script.pl -after_failure: - - perl ./maint-travis-ci/report_fail_ctx.pl -branches: - only: - - "build/master" - - "releases" - diff --git a/maint-travis-ci/yamls/sterile2.yaml b/maint-travis-ci/yamls/sterile2.yaml deleted file mode 100644 index 9186391..0000000 --- a/maint-travis-ci/yamls/sterile2.yaml +++ /dev/null @@ -1,44 +0,0 @@ -language: perl -matrix: - include: - - perl: "5.8" - env: STERILIZE_ENV=0 - - perl: "5.10" - env: STERILIZE_ENV=0 - - perl: "5.12" - env: STERILIZE_ENV=0 - - perl: "5.14" - env: STERILIZE_ENV=0 - - perl: "5.16" - env: STERILIZE_ENV=0 - - perl: "5.18" - env: STERILIZE_ENV=0 - - perl: "5.19" - env: STERILIZE_ENV=0 - - perl: "5.8" - env: STERILIZE_ENV=1 - - perl: "5.10" - env: STERILIZE_ENV=1 - - perl: "5.19" - env: STERILIZE_ENV=1 - - perl: "5.19" - env: STERILIZE_ENV=0 DEVELOPER_DEPS=1 - - perl: "5.19" - env: STERILIZE_ENV=0 RELEASE_TESTING=1 AUTHOR_TESTING=1 -before_install: - - perlbrew list - - time perl ./maint-travis-ci/sterilize_env.pl -install: - - time perl ./maint-travis-ci/install_deps.pl -before_script: - - time perl ./maint-travis-ci/before_script.pl -script: - - time perl ./maint-travis-ci/script.pl -after_failure: - - perl ./maint-travis-ci/report_fail_ctx.pl -branches: - only: - - "master" - - "build/master" - - "releases" - -- 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