[libdist-zilla-role-bootstrap-perl] 01/01: Build results of 4ab44a4 (on master)

Axel Beckert abe at deuxchevaux.org
Sat Aug 8 11:58:21 UTC 2015


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

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

commit 3470f96d39d3af95f053546d99b217dfb59391a9
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Tue Sep 24 14:37:55 2013 +1200

    Build results of 4ab44a4 (on master)
---
 .travis.yml                                       |  6 +++
 Build.PL                                          |  3 +-
 Changes                                           |  8 ++++
 MANIFEST                                          |  5 +++
 META.json                                         | 12 +++--
 META.yml                                          | 12 +++--
 README                                            |  2 +-
 lib/Dist/Zilla/Role/Bootstrap.pm                  |  7 ++-
 maint-travis-ci/README.mkdn                       | 53 +++++++++++++++++++++++
 maint-travis-ci/merge_travis_yml.pl               | 31 +++++++++++++
 maint-travis-ci/sterilize_env.pl                  | 31 +++++++++++++
 maint-travis-ci/sync_tree.pl                      | 24 ++++++++++
 .travis.yml => maint-travis-ci/yamls/sterile.yaml |  6 +++
 t/000-report-versions-tiny.t                      |  1 -
 t/01-basic.t                                      | 10 ++---
 t/02-try-built-mtime.t                            | 12 ++---
 t/03-try-built-parseversion.t                     | 10 ++---
 17 files changed, 195 insertions(+), 38 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 481c4de..df1af65 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,12 @@ perl:
   - "5.14"
   - "5.18"
   - "5.19"
+env:
+  matrix:
+    - STERILIZE_ENV=0
+    - STERILIZE_ENV=1
+before_install:
+  - perl ./maint-travis-ci/sterilize_env.pl
 branches:
   only:
     - "build/master"
diff --git a/Build.PL b/Build.PL
index e2e3742..5433393 100644
--- a/Build.PL
+++ b/Build.PL
@@ -17,14 +17,13 @@ my %module_build_args = (
     "Kent Fredric <kentfredric\@gmail.com>"
   ],
   "dist_name" => "Dist-Zilla-Role-Bootstrap",
-  "dist_version" => "0.2.0",
+  "dist_version" => "0.2.1",
   "license" => "perl",
   "module_name" => "Dist::Zilla::Role::Bootstrap",
   "recommends" => {},
   "recursive_test_files" => 1,
   "requires" => {
     "Carp" => 0,
-    "Cwd" => 0,
     "Dist::Zilla::Role::Plugin" => 0,
     "List::UtilsBy" => 0,
     "Moose::Role" => 0,
diff --git a/Changes b/Changes
index 941127c..171289b 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
 Release history for Dist-Zilla-Role-Bootstrap
 
+0.2.1 2013-09-24T02:37:30Z
+ [Bugfix]
+ - use ->realpath for comparisons to avoid symlink confusion on darwin
+ - use $zilla->root instead of calling cwd()
+
+ [Dependencies::Removed / runtime requires]
+ - Cwd
+
 0.2.0 2013-09-21T12:39:54Z
  [00 Major - try_built_method]
  - New mechanisms for try_built if there is >1 build trees
diff --git a/MANIFEST b/MANIFEST
index 2229f5b..94ff1a4 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -11,6 +11,11 @@ corpus/fake_dist_01/lib/E.pm
 corpus/fake_dist_01/t/placeholder.txt
 dist.ini
 lib/Dist/Zilla/Role/Bootstrap.pm
+maint-travis-ci/README.mkdn
+maint-travis-ci/merge_travis_yml.pl
+maint-travis-ci/sterilize_env.pl
+maint-travis-ci/sync_tree.pl
+maint-travis-ci/yamls/sterile.yaml
 perlcritic.rc
 t/00-compile.t
 t/000-report-versions-tiny.t
diff --git a/META.json b/META.json
index 9d3f3ba..7f75f77 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Kent Fredric <kentfredric at gmail.com>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620",
+   "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661",
    "license" : [
       "perl_5"
    ],
@@ -45,7 +45,6 @@
       "runtime" : {
          "requires" : {
             "Carp" : "0",
-            "Cwd" : "0",
             "Dist::Zilla::Role::Plugin" : "0",
             "List::UtilsBy" : "0",
             "Moose::Role" : "0",
@@ -77,7 +76,7 @@
    "provides" : {
       "Dist::Zilla::Role::Bootstrap" : {
          "file" : "lib/Dist/Zilla/Role/Bootstrap.pm",
-         "version" : "v0.2.0"
+         "version" : "v0.2.1"
       }
    },
    "release_status" : "stable",
@@ -92,11 +91,10 @@
          "web" : "https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap"
       }
    },
-   "version" : "0.2.0",
+   "version" : "0.2.1",
    "x_BuiltWith" : {
       "modules" : {
          "Carp" : "1.32",
-         "Cwd" : "3.44",
          "Dist::Zilla::Chrome::Test" : "4.300039",
          "Dist::Zilla::Dist::Builder" : "4.300039",
          "Dist::Zilla::MVP::Assembler::Zilla" : "4.300039",
@@ -114,7 +112,7 @@
          "Moose::Role" : "2.1005",
          "MooseX::AttributeShortcuts" : "0.021",
          "Path::FindDev" : "0.3.1",
-         "Path::Tiny" : "0.033",
+         "Path::Tiny" : "0.034",
          "Pod::Coverage::TrustPod" : "0.100002",
          "Test::CPAN::Changes" : "0.23",
          "Test::CPAN::Meta" : "0.23",
@@ -143,7 +141,7 @@
          "osname" : "linux"
       },
       "platform" : "linux",
-      "uname" : "Linux 3.11.0-gentoo x86_64 GenuineIntel GNU/Linux"
+      "uname" : "Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux"
    },
    "x_Dist_Zilla" : {
       "perl" : {
diff --git a/META.yml b/META.yml
index f241740..6a2f833 100644
--- a/META.yml
+++ b/META.yml
@@ -18,7 +18,7 @@ build_requires:
 configure_requires:
   Module::Build: 0.4007
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620'
+generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132661'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,10 +27,9 @@ name: Dist-Zilla-Role-Bootstrap
 provides:
   Dist::Zilla::Role::Bootstrap:
     file: lib/Dist/Zilla/Role/Bootstrap.pm
-    version: v0.2.0
+    version: v0.2.1
 requires:
   Carp: 0
-  Cwd: 0
   Dist::Zilla::Role::Plugin: 0
   List::UtilsBy: 0
   Moose::Role: 0
@@ -45,11 +44,10 @@ resources:
   bugtracker: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap/issues
   homepage: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap
   repository: https://github.com/kentfredric/Dist-Zilla-Role-Bootstrap.git
-version: 0.2.0
+version: 0.2.1
 x_BuiltWith:
   modules:
     Carp: 1.32
-    Cwd: 3.44
     Dist::Zilla::Chrome::Test: 4.300039
     Dist::Zilla::Dist::Builder: 4.300039
     Dist::Zilla::MVP::Assembler::Zilla: 4.300039
@@ -67,7 +65,7 @@ x_BuiltWith:
     Moose::Role: 2.1005
     MooseX::AttributeShortcuts: 0.021
     Path::FindDev: 0.3.1
-    Path::Tiny: 0.033
+    Path::Tiny: 0.034
     Pod::Coverage::TrustPod: 0.100002
     Test::CPAN::Changes: 0.23
     Test::CPAN::Meta: 0.23
@@ -92,7 +90,7 @@ x_BuiltWith:
     myarchname: x86_64-linux
     osname: linux
   platform: linux
-  uname: 'Linux 3.11.0-gentoo x86_64 GenuineIntel GNU/Linux'
+  uname: 'Linux 3.11.1-gentoo x86_64 GenuineIntel GNU/Linux'
 x_Dist_Zilla:
   perl:
     version: 5.019003
diff --git a/README b/README
index 1f8037e..a4e4462 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
 
 VERSION
-    version 0.2.0
+    version 0.2.1
 
 SYNOPSIS
     For consuming plugins:
diff --git a/lib/Dist/Zilla/Role/Bootstrap.pm b/lib/Dist/Zilla/Role/Bootstrap.pm
index 346cdd9..88f5dc7 100644
--- a/lib/Dist/Zilla/Role/Bootstrap.pm
+++ b/lib/Dist/Zilla/Role/Bootstrap.pm
@@ -6,7 +6,7 @@ BEGIN {
   $Dist::Zilla::Role::Bootstrap::AUTHORITY = 'cpan:KENTNL';
 }
 {
-  $Dist::Zilla::Role::Bootstrap::VERSION = '0.2.0';
+  $Dist::Zilla::Role::Bootstrap::VERSION = '0.2.1';
 }
 
 # ABSTRACT: Shared logic for bootstrap things.
@@ -60,8 +60,7 @@ has _cwd => (
   lazy    => 1,
   builder => sub {
     require Path::Tiny;
-    require Cwd;
-    return Path::Tiny::path( Cwd::cwd() );
+    return Path::Tiny::path( $_[0]->zilla->root );
   },
 );
 
@@ -203,7 +202,7 @@ Dist::Zilla::Role::Bootstrap - Shared logic for bootstrap things.
 
 =head1 VERSION
 
-version 0.2.0
+version 0.2.1
 
 =head1 SYNOPSIS
 
diff --git a/maint-travis-ci/README.mkdn b/maint-travis-ci/README.mkdn
new file mode 100644
index 0000000..80d1add
--- /dev/null
+++ b/maint-travis-ci/README.mkdn
@@ -0,0 +1,53 @@
+# 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/merge_travis_yml.pl b/maint-travis-ci/merge_travis_yml.pl
new file mode 100644
index 0000000..fc33dca
--- /dev/null
+++ b/maint-travis-ci/merge_travis_yml.pl
@@ -0,0 +1,31 @@
+#!/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/sterilize_env.pl b/maint-travis-ci/sterilize_env.pl
new file mode 100644
index 0000000..df4c9de
--- /dev/null
+++ b/maint-travis-ci/sterilize_env.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use utf8;
+
+sub diag {
+    print STDERR @_;
+    print STDERR "\n";
+}
+
+if ( not exists $ENV{STERILIZE_ENV} ) {
+    diag('STERILIZE_ENV unset');
+    exit 0;
+}
+if ( $ENV{STERILIZE_ENV} < 1 ) {
+    diag('STERLIZIE_ENV < 1, Not Sterilizing');
+    exit 0;
+}
+if ( not exists $ENV{TRAVIS} ) {
+    diag('Is not running under travis!');
+    exit 1;
+}
+for my $i (@INC) {
+    next if $i !~ /site/;
+    next if $i eq '.';
+    diag( 'Sterilizing files in ' . $i );
+    system( 'find', $i, '-type', 'f', '-delete' );
+    diag( 'Sterilizing dirs in ' . $i );
+    system( 'find', $i, '-depth', '-type', 'd', '-delete' );
+}
+
diff --git a/maint-travis-ci/sync_tree.pl b/maint-travis-ci/sync_tree.pl
new file mode 100755
index 0000000..542d325
--- /dev/null
+++ b/maint-travis-ci/sync_tree.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use utf8;
+
+use Path::FindDev qw( find_dev );
+my $root = find_dev('./');
+
+chdir "$root";
+
+sub git_subtree {
+    system( 'git', 'subtree', @_ ) == 0 or die "Git subtree had nonzero exit";
+}
+
+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/.travis.yml b/maint-travis-ci/yamls/sterile.yaml
similarity index 50%
copy from .travis.yml
copy to maint-travis-ci/yamls/sterile.yaml
index 481c4de..df1af65 100644
--- a/.travis.yml
+++ b/maint-travis-ci/yamls/sterile.yaml
@@ -4,6 +4,12 @@ perl:
   - "5.14"
   - "5.18"
   - "5.19"
+env:
+  matrix:
+    - STERILIZE_ENV=0
+    - STERILIZE_ENV=1
+before_install:
+  - perl ./maint-travis-ci/sterilize_env.pl
 branches:
   only:
     - "build/master"
diff --git a/t/000-report-versions-tiny.t b/t/000-report-versions-tiny.t
index be641fb..1515003 100644
--- a/t/000-report-versions-tiny.t
+++ b/t/000-report-versions-tiny.t
@@ -49,7 +49,6 @@ sub pmver {
 }
 
 eval { $v .= pmver('Carp','any version') };
-eval { $v .= pmver('Cwd','any version') };
 eval { $v .= pmver('Dist::Zilla::Chrome::Test','any version') };
 eval { $v .= pmver('Dist::Zilla::Dist::Builder','any version') };
 eval { $v .= pmver('Dist::Zilla::MVP::Assembler::Zilla','any version') };
diff --git a/t/01-basic.t b/t/01-basic.t
index 1c718b4..396d7f4 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -60,11 +60,11 @@ is_deeply(
   'dump_config is expected'
 );
 
-is( $instance->distname,        'Example', 'distname is Example' );
-is( $instance->_cwd,            $scratch,  'cwd is project root/' );
-is( $instance->try_built,       undef,     'try_built is off' );
-is( $instance->fallback,        1,         'fallback is on' );
-is( $instance->_bootstrap_root, $scratch,  '_bootstrap_root == _cwd' );
+is( $instance->distname,        'Example',          'distname is Example' );
+is( $instance->_cwd->realpath,  $scratch->realpath, 'cwd is project root/' );
+is( $instance->try_built,       undef,              'try_built is off' );
+is( $instance->fallback,        1,                  'fallback is on' );
+is( $instance->_bootstrap_root, $scratch,           '_bootstrap_root == _cwd' );
 ok( $instance->can('_add_inc'), '_add_inc method exists' );
 
 done_testing;
diff --git a/t/02-try-built-mtime.t b/t/02-try-built-mtime.t
index 34b1f79..f8cf6f8 100644
--- a/t/02-try-built-mtime.t
+++ b/t/02-try-built-mtime.t
@@ -78,12 +78,12 @@ is_deeply(
   'dump_config is expected'
 );
 
-is( $instance->distname,         'Example',                       'distname is Example' );
-is( $instance->_cwd,             $scratch,                        'cwd is project root/' );
-is( $instance->try_built,        1,                               'try_built is on' );
-is( $instance->try_built_method, 'mtime',                         'try_built_method is mtime' );
-is( $instance->fallback,         1,                               'fallback is on' );
-is( $instance->_bootstrap_root,  $scratch->child('Example-0.05'), '_bootstrap_root == _cwd' );
+is( $instance->distname,                  'Example',                                 'distname is Example' );
+is( $instance->_cwd->realpath,            $scratch->realpath,                        'cwd is project root/' );
+is( $instance->try_built,                 1,                                         'try_built is on' );
+is( $instance->try_built_method,          'mtime',                                   'try_built_method is mtime' );
+is( $instance->fallback,                  1,                                         'fallback is on' );
+is( $instance->_bootstrap_root->realpath, $scratch->child('Example-0.05')->realpath, '_bootstrap_root == _cwd' );
 ok( $instance->can('_add_inc'), '_add_inc method exists' );
 
 chdir $cwd->stringify;
diff --git a/t/03-try-built-parseversion.t b/t/03-try-built-parseversion.t
index 9ed6800..f443e2b 100644
--- a/t/03-try-built-parseversion.t
+++ b/t/03-try-built-parseversion.t
@@ -76,13 +76,13 @@ is_deeply(
   'dump_config is expected'
 );
 
-is( $instance->distname,         'Example',      'distname is Example' );
-is( $instance->_cwd,             $scratch,       'cwd is project root/' );
-is( $instance->try_built,        1,              'try_built is on' );
-is( $instance->try_built_method, 'parseversion', 'try_built_method is parseversion' );
+is( $instance->distname,         'Example',          'distname is Example' );
+is( $instance->_cwd->realpath,   $scratch->realpath, 'cwd is project root/' );
+is( $instance->try_built,        1,                  'try_built is on' );
+is( $instance->try_built_method, 'parseversion',     'try_built_method is parseversion' );
 
 is( $instance->fallback, 1, 'fallback is on' );
-is( $instance->_bootstrap_root, $scratch->child('Example-0.10'), '_bootstrap_root == _cwd' );
+is( $instance->_bootstrap_root->realpath, $scratch->child('Example-0.10')->realpath, '_bootstrap_root == _cwd' );
 ok( $instance->can('_add_inc'), '_add_inc method exists' );
 
 chdir $cwd->stringify;

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



More information about the Pkg-perl-cvs-commits mailing list