r69154 - in /branches/upstream/libdist-zilla-plugin-git-perl/current: ./ lib/Dist/Zilla/Plugin/ lib/Dist/Zilla/Plugin/Git/ lib/Dist/Zilla/PluginBundle/ lib/Dist/Zilla/Role/Git/ t/ t/commit-build-custom/ t/commit-dirtydir/ t/lib/ t/lib/Dist/ t/lib/Dist/Zilla/ t/lib/Dist/Zilla/Plugin/
ghedo-guest at users.alioth.debian.org
ghedo-guest at users.alioth.debian.org
Sun Feb 20 17:30:37 UTC 2011
Author: ghedo-guest
Date: Sun Feb 20 17:30:15 2011
New Revision: 69154
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69154
Log:
[svn-upgrade] new version libdist-zilla-plugin-git-perl (1.110500)
Added:
branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-dirtydir.t
branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/
branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/Changes
branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/dist.ini
branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/
branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/
branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/
branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/
branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm
Modified:
branches/upstream/libdist-zilla-plugin-git-perl/current/Build.PL
branches/upstream/libdist-zilla-plugin-git-perl/current/Changes
branches/upstream/libdist-zilla-plugin-git-perl/current/MANIFEST
branches/upstream/libdist-zilla-plugin-git-perl/current/META.json
branches/upstream/libdist-zilla-plugin-git-perl/current/META.yml
branches/upstream/libdist-zilla-plugin-git-perl/current/README
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Check.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Commit.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/CommitBuild.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Init.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/NextVersion.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Push.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Tag.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/PluginBundle/Git.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Role/Git/DirtyFiles.pm
branches/upstream/libdist-zilla-plugin-git-perl/current/t/000-report-versions-tiny.t
branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-build-custom.t
branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-build-custom/dist.ini
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/Build.PL?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/Build.PL (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/Build.PL Sun Feb 20 17:30:15 2011
@@ -7,7 +7,9 @@
my %module_build_args = (
'build_requires' => {
+ 'Dist::Zilla::Role::Releaser' => '0',
'Dist::Zilla::Tester' => '0',
+ 'File::Copy' => '0',
'File::Copy::Recursive' => '0',
'File::Find' => '0',
'File::pushd' => '0',
@@ -24,7 +26,7 @@
'Jerome Quelin'
],
'dist_name' => 'Dist-Zilla-Plugin-Git',
- 'dist_version' => '1.110330',
+ 'dist_version' => '1.110500',
'license' => 'perl',
'module_name' => 'Dist::Zilla::Plugin::Git',
'recommends' => {},
@@ -50,6 +52,7 @@
'Moose::Role' => '0',
'MooseX::Has::Sugar' => '0',
'MooseX::Types::Moose' => '0',
+ 'Path::Class::Dir' => '0',
'String::Formatter' => '0',
'Version::Next' => '0',
'namespace::autoclean' => '0.09',
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/Changes?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/Changes (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/Changes Sun Feb 20 17:30:15 2011
@@ -1,4 +1,13 @@
Revision history for Dist::Zilla::Plugin::Git
+
+1.110500 2011-02-19 12:43:19 Europe/Paris
+ - add 'add_files_in' to Commit so you can commit an entire dir (Apocalypse)
+ If you need the same concept for Check please let us know!
+
+1.110480 2011-02-17 18:03:06 Europe/Paris
+ - CommitBuild support for release_message (nigel metheringham)
+ - Also supports %v & %t format tags, more appropriate for message on
+ commit build of the released package (nigel metheringham)
1.110330 2011-02-02 10:36:33 Europe/Paris
- fix rt#62484 - add a link to Git::NextVersion in main documentation
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/MANIFEST?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/MANIFEST (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/MANIFEST Sun Feb 20 17:30:15 2011
@@ -27,6 +27,7 @@
t/1-check.t
t/2-commit-build-custom.t
t/2-commit-build.t
+t/2-commit-dirtydir.t
t/2-commit-ws.t
t/2-commit.t
t/3-tag.t
@@ -41,10 +42,13 @@
t/commit-build-custom/dist.ini
t/commit-build/Changes
t/commit-build/dist.ini
+t/commit-dirtydir/Changes
+t/commit-dirtydir/dist.ini
t/commit-ws/Changes
t/commit-ws/dist.ini
t/commit/Changes
t/commit/dist.ini
+t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm
t/push-multi/Changes
t/push-multi/dist.ini
t/push/Changes
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/META.json?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/META.json (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/META.json Sun Feb 20 17:30:15 2011
@@ -46,6 +46,7 @@
"Moose::Role" : 0,
"MooseX::Has::Sugar" : 0,
"MooseX::Types::Moose" : 0,
+ "Path::Class::Dir" : 0,
"String::Formatter" : 0,
"Version::Next" : 0,
"namespace::autoclean" : "0.09",
@@ -55,7 +56,9 @@
},
"test" : {
"requires" : {
+ "Dist::Zilla::Role::Releaser" : 0,
"Dist::Zilla::Tester" : 0,
+ "File::Copy" : 0,
"File::Copy::Recursive" : 0,
"File::Find" : 0,
"File::pushd" : 0,
@@ -68,43 +71,43 @@
"provides" : {
"Dist::Zilla::Plugin::Git" : {
"file" : "lib/Dist/Zilla/Plugin/Git.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::Check" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Check.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::Commit" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Commit.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::CommitBuild" : {
"file" : "lib/Dist/Zilla/Plugin/Git/CommitBuild.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::Init" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Init.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::NextVersion" : {
"file" : "lib/Dist/Zilla/Plugin/Git/NextVersion.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::Push" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Push.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Plugin::Git::Tag" : {
"file" : "lib/Dist/Zilla/Plugin/Git/Tag.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::PluginBundle::Git" : {
"file" : "lib/Dist/Zilla/PluginBundle/Git.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"file" : "lib/Dist/Zilla/Role/Git/DirtyFiles.pm",
- "version" : "1.110330"
+ "version" : "1.110500"
}
},
"release_status" : "stable",
@@ -121,7 +124,7 @@
},
"x_MailingList" : "http://www.listbox.com/subscribe/?list_id=139292"
},
- "version" : "1.110330",
+ "version" : "1.110500",
"x_Dist_Zilla" : {
"plugins" : [
{
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/META.yml?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/META.yml (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/META.yml Sun Feb 20 17:30:15 2011
@@ -3,7 +3,9 @@
author:
- 'Jerome Quelin'
build_requires:
+ Dist::Zilla::Role::Releaser: 0
Dist::Zilla::Tester: 0
+ File::Copy: 0
File::Copy::Recursive: 0
File::Find: 0
File::pushd: 0
@@ -23,34 +25,34 @@
provides:
Dist::Zilla::Plugin::Git:
file: lib/Dist/Zilla/Plugin/Git.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::Check:
file: lib/Dist/Zilla/Plugin/Git/Check.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::Commit:
file: lib/Dist/Zilla/Plugin/Git/Commit.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::CommitBuild:
file: lib/Dist/Zilla/Plugin/Git/CommitBuild.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::Init:
file: lib/Dist/Zilla/Plugin/Git/Init.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::NextVersion:
file: lib/Dist/Zilla/Plugin/Git/NextVersion.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::Push:
file: lib/Dist/Zilla/Plugin/Git/Push.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Plugin::Git::Tag:
file: lib/Dist/Zilla/Plugin/Git/Tag.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::PluginBundle::Git:
file: lib/Dist/Zilla/PluginBundle/Git.pm
- version: 1.110330
+ version: 1.110500
Dist::Zilla::Role::Git::DirtyFiles:
file: lib/Dist/Zilla/Role/Git/DirtyFiles.pm
- version: 1.110330
+ version: 1.110500
requires:
Class::MOP: 0
Cwd: 0
@@ -72,6 +74,7 @@
Moose::Role: 0
MooseX::Has::Sugar: 0
MooseX::Types::Moose: 0
+ Path::Class::Dir: 0
String::Formatter: 0
Version::Next: 0
namespace::autoclean: 0.09
@@ -82,7 +85,7 @@
homepage: http://search.cpan.org/dist/Dist-Zilla-Plugin-Git/
repository: git://github.com/jquelin/dist-zilla-plugin-git.git
x_MailingList: http://www.listbox.com/subscribe/?list_id=139292
-version: 1.110330
+version: 1.110500
x_Dist_Zilla:
plugins:
-
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/README?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/README (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/README Sun Feb 20 17:30:15 2011
@@ -1,7 +1,7 @@
This archive contains the distribution Dist-Zilla-Plugin-Git,
-version 1.110330:
+version 1.110500:
update your git repository after release
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git;
BEGIN {
- $Dist::Zilla::Plugin::Git::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::VERSION = '1.110500';
}
# ABSTRACT: update your git repository after release
@@ -28,7 +28,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 DESCRIPTION
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Check.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Check.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Check.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Check.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::Check;
BEGIN {
- $Dist::Zilla::Plugin::Git::Check::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::Check::VERSION = '1.110500';
}
# ABSTRACT: check your git repository before releasing
@@ -78,7 +78,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Commit.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Commit.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Commit.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Commit.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::Commit;
BEGIN {
- $Dist::Zilla::Plugin::Git::Commit::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::Commit::VERSION = '1.110500';
}
# ABSTRACT: commit dirty files
@@ -21,6 +21,7 @@
use Moose;
use MooseX::Has::Sugar;
use MooseX::Types::Moose qw{ Str };
+use Path::Class::Dir ();
use String::Formatter method_stringf => {
-as => '_format_string',
@@ -45,9 +46,11 @@
has commit_msg => ( ro, isa=>Str, default => 'v%v%n%n%c' );
has time_zone => ( ro, isa=>Str, default => 'local' );
-
+has add_files_in => ( ro, isa=>'ArrayRef[Str]', default => sub { [] } );
# -- public methods
+
+sub mvp_multivalue_args { qw( add_files_in ) }
sub after_release {
my $self = shift;
@@ -59,7 +62,22 @@
# otherwise before_release would have failed, ending the release
# process.
@output = sort { lc $a cmp lc $b } $self->list_dirty_files($git, 1);
- return unless @output;
+
+ # add any other untracked files to the commit list
+ if ( @{ $self->add_files_in } ) {
+ my @untracked_files = $git->ls_files( { others=>1, 'exclude-standard'=>1 } );
+ foreach my $f ( @untracked_files ) {
+ foreach my $path ( @{ $self->add_files_in } ) {
+ if ( Path::Class::Dir->new( $path )->subsumes( $f ) ) {
+ push( @output, $f );
+ last;
+ }
+ }
+ }
+ }
+
+ # if nothing to commit, we're done!
+ return unless @output;
# write commit message in a temp file
my ($fh, $filename) = tempfile( 'DZP-git.XXXX', UNLINK => 1 );
@@ -111,7 +129,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
@@ -137,6 +155,14 @@
modified. This option may appear multiple times. The default
list is F<dist.ini> and the changelog file given by C<changelog>.
+=item * add_files_in - a path that will have its new files checked in.
+This option may appear multiple times. This is used to add files
+generated during build-time to the repository, for example. The default
+list is empty.
+
+Note: The files have to be generated between those phases: BeforeRelease
+E<lt>-E<gt> AfterRelease, and after Git::Check + before Git::Commit.
+
=item * commit_msg - the commit message to use. Defaults to
C<v%v%n%n%c>, meaning the version number and the list of changes.
@@ -184,7 +210,7 @@
This method returns the commit message. The default implementation
reads the Changes file to get the list of changes in the just-released version.
-=for Pod::Coverage after_release
+=for Pod::Coverage after_release mvp_multivalue_args
=head1 AUTHOR
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/CommitBuild.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/CommitBuild.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/CommitBuild.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/CommitBuild.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::CommitBuild;
BEGIN {
- $Dist::Zilla::Plugin::Git::CommitBuild::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::CommitBuild::VERSION = '1.110500';
}
# ABSTRACT: checkin build results on separate branch
@@ -35,9 +35,11 @@
method_stringf => {
-as => '_format_message',
codes => {
- b => sub { (shift->name_rev( '--name-only', 'HEAD' ))[0] },
- h => sub { (shift->rev_parse( '--short', 'HEAD' ))[0] },
- H => sub { (shift->rev_parse('HEAD'))[0] },
+ b => sub { (shift->_git->name_rev( '--name-only', 'HEAD' ))[0] },
+ h => sub { (shift->_git->rev_parse( '--short', 'HEAD' ))[0] },
+ H => sub { (shift->_git->rev_parse('HEAD'))[0] },
+ t => sub { shift->zilla->is_trial ? '-TRIAL' : '' },
+ v => sub { shift->zilla->version },
}
}
);
@@ -49,7 +51,13 @@
has branch => ( ro, isa => Str, default => 'build/%b', required => 1 );
has release_branch => ( ro, isa => Str, required => 0 );
has message => ( ro, isa => Str, default => 'Build results of %h (on %b)', required => 1 );
+has release_message => ( ro, isa => Str, lazy => 1, builder => '_build_release_message' );
has build_root => ( rw );
+has _git => (rw, weak_ref => 1);
+
+# -- attribute builders
+
+sub _build_release_message { return shift->message; }
# -- role implementation
@@ -60,22 +68,23 @@
# the 'after_release' stage
$self->build_root( $args->{build_root} );
- $self->_commit_build( $args, $self->branch );
+ $self->_commit_build( $args, $self->branch, $self->message );
}
sub after_release {
my ( $self, $args) = @_;
- $self->_commit_build( $args, $self->release_branch );
+ $self->_commit_build( $args, $self->release_branch, $self->release_message );
}
sub _commit_build {
- my ( $self, undef, $branch ) = @_;
+ my ( $self, undef, $branch, $message ) = @_;
return unless $branch;
my $tmp_dir = File::Temp->newdir( CLEANUP => 1) ;
my $src = Git::Wrapper->new('.');
+ $self->_git($src);
my $dir = rel2abs( $self->build_root );
@@ -114,7 +123,7 @@
#
my ($fh, $filename) = File::Temp::tempfile();
$fh->autoflush(1);
- print $fh _format_message( $self->message, $src );
+ print $fh _format_message( $message, $self );
my @args=('git', 'commit-tree', $tree, map { ( -p => $_ ) } @parents);
push @args,'<'.$filename;
@@ -139,7 +148,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
@@ -163,11 +172,14 @@
=over 4
=item * branch - L<String::Formatter> string for where to commit the
-build contents
+build contents.
A single formatting code (C<%b>) is defined for this attribute and will be
substituted with the name of the current branch in your git repository.
+Defaults to C<build/%b>, but if set explicitly to an empty string
+causes no build contents checkin to be made.
+
=item * release_branch - L<String::Formatter> string for where to commit the
build contents
@@ -177,7 +189,7 @@
=item * message - L<String::Formatter> string for what commit message
to use when committing the results of the build.
-This option supports three formatting codes:
+This option supports five formatting codes:
=over 4
@@ -187,7 +199,15 @@
=item * C<%h> - Abbreviated commit hash
+=item * C<%v> - The release version number
+
+=item * C<%t> - The string "-TRIAL" if this is a trial release
+
=back
+
+=item * release_message - L<String::Formatter> string for what
+commit message to use when committing the results of the release.
+Defaults to the same as C<message>.
=back
@@ -210,3 +230,4 @@
__END__
+
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Init.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Init.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Init.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Init.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::Init;
BEGIN {
- $Dist::Zilla::Plugin::Git::Init::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::Init::VERSION = '1.110500';
}
# ABSTRACT: initialize git repository on dzil new
@@ -88,7 +88,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/NextVersion.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/NextVersion.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/NextVersion.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/NextVersion.pm Sun Feb 20 17:30:15 2011
@@ -11,7 +11,7 @@
package Dist::Zilla::Plugin::Git::NextVersion;
BEGIN {
- $Dist::Zilla::Plugin::Git::NextVersion::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::NextVersion::VERSION = '1.110500';
}
# ABSTRACT: provide a version number by bumping the last git release tag
@@ -75,7 +75,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Push.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Push.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Push.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Push.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::Push;
BEGIN {
- $Dist::Zilla::Plugin::Git::Push::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::Push::VERSION = '1.110500';
}
# ABSTRACT: push current branch
@@ -59,7 +59,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Tag.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Tag.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Tag.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Plugin/Git/Tag.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Plugin::Git::Tag;
BEGIN {
- $Dist::Zilla::Plugin::Git::Tag::VERSION = '1.110330';
+ $Dist::Zilla::Plugin::Git::Tag::VERSION = '1.110500';
}
# ABSTRACT: tag the new version
@@ -94,7 +94,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/PluginBundle/Git.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/PluginBundle/Git.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/PluginBundle/Git.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/PluginBundle/Git.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::PluginBundle::Git;
BEGIN {
- $Dist::Zilla::PluginBundle::Git::VERSION = '1.110330';
+ $Dist::Zilla::PluginBundle::Git::VERSION = '1.110500';
}
# ABSTRACT: all git plugins in one go
@@ -66,7 +66,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 SYNOPSIS
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Role/Git/DirtyFiles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Role/Git/DirtyFiles.pm?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Role/Git/DirtyFiles.pm (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/lib/Dist/Zilla/Role/Git/DirtyFiles.pm Sun Feb 20 17:30:15 2011
@@ -12,7 +12,7 @@
package Dist::Zilla::Role::Git::DirtyFiles;
BEGIN {
- $Dist::Zilla::Role::Git::DirtyFiles::VERSION = '1.110330';
+ $Dist::Zilla::Role::Git::DirtyFiles::VERSION = '1.110500';
}
# ABSTRACT: provide the allow_dirty & changelog attributes
@@ -70,7 +70,7 @@
=head1 VERSION
-version 1.110330
+version 1.110500
=head1 DESCRIPTION
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/t/000-report-versions-tiny.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/000-report-versions-tiny.t?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/000-report-versions-tiny.t (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/000-report-versions-tiny.t Sun Feb 20 17:30:15 2011
@@ -57,8 +57,10 @@
eval { $v .= pmver('Dist::Zilla::Role::AfterRelease','any version') };
eval { $v .= pmver('Dist::Zilla::Role::BeforeRelease','any version') };
eval { $v .= pmver('Dist::Zilla::Role::PluginBundle','any version') };
+eval { $v .= pmver('Dist::Zilla::Role::Releaser','any version') };
eval { $v .= pmver('Dist::Zilla::Role::VersionProvider','any version') };
eval { $v .= pmver('Dist::Zilla::Tester','any version') };
+eval { $v .= pmver('File::Copy','any version') };
eval { $v .= pmver('File::Copy::Recursive','any version') };
eval { $v .= pmver('File::Find','any version') };
eval { $v .= pmver('File::Spec::Functions','any version') };
@@ -74,6 +76,7 @@
eval { $v .= pmver('MooseX::Has::Sugar','any version') };
eval { $v .= pmver('MooseX::Types::Moose','any version') };
eval { $v .= pmver('Path::Class','any version') };
+eval { $v .= pmver('Path::Class::Dir','any version') };
eval { $v .= pmver('String::Formatter','any version') };
eval { $v .= pmver('Test::Exception','any version') };
eval { $v .= pmver('Test::More','0.88') };
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-build-custom.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-build-custom.t?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-build-custom.t (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-build-custom.t Sun Feb 20 17:30:15 2011
@@ -15,7 +15,7 @@
use Dist::Zilla::Tester;
use Git::Wrapper;
use Path::Class;
-use Test::More tests => 2;
+use Test::More tests => 5;
use Cwd qw(cwd);
my $cwd = cwd();
@@ -37,3 +37,9 @@
$zilla->build;
ok( eval { $git->rev_parse('-q', '--verify', 'refs/heads/build-dev') }, 'source repo has the "build-dev" branch') or diag explain $@, $git->branch;
is( $git->log('build-dev'), 2, 'one commit on the build-dev branch') or diag $git->branch;
+
+$zilla->release;
+ok( eval { $git->rev_parse('-q', '--verify', 'refs/heads/release') }, 'source repo has the "release" branch') or diag explain $@, $git->branch;
+my @logs = $git->log('release');
+is( scalar(@logs), 2, 'one commit on the release branch') or diag $git->branch;
+like( $logs[0]->message, qr/^Release of 1\.23\b/, 'correct release commit log message generated');
Added: branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-dirtydir.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-dirtydir.t?rev=69154&op=file
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-dirtydir.t (added)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/2-commit-dirtydir.t Sun Feb 20 17:30:15 2011
@@ -1,0 +1,58 @@
+#!perl
+#
+# This file is part of Dist-Zilla-Plugin-Git
+#
+# This software is copyright (c) 2009 by Jerome Quelin.
+#
+# This is free software; you can redistribute it and/or modify it under
+# the same terms as the Perl 5 programming language system itself.
+#
+
+use strict;
+use warnings;
+
+use Dist::Zilla 1.093250;
+use Dist::Zilla::Tester;
+use Git::Wrapper;
+use Path::Class;
+use lib 't/lib';
+use Test::More tests => 3;
+
+# build fake repository
+my $zilla = Dist::Zilla::Tester->from_config({
+ dist_root => dir(qw(t commit-dirtydir)),
+});
+
+chdir $zilla->tempdir->subdir('source');
+system "git init";
+my $git = Git::Wrapper->new('.');
+$git->config( 'user.name' => 'dzp-git test' );
+$git->config( 'user.email' => 'dzp-git at test' );
+$git->add( qw{ dist.ini Changes } );
+$git->commit( { message => 'initial commit' } );
+
+# do a release, with changes and dist.ini updated
+append_to_file('Changes', "\n");
+append_to_file('dist.ini', "\n");
+$zilla->release;
+
+# check if dist.ini and changelog have been committed
+my ($log) = $git->log( 'HEAD' );
+is( $log->message, "v1.23\n\n- foo\n- bar\n- baz\n", 'commit message taken from changelog' );
+
+# check if we committed our tarball
+my @files = $git->ls_files( { cached => 1 } );
+ok( ( grep { $_ =~ /releases/ } @files ), "We committed the tarball" );
+
+# We should have no dirty files uncommitted
+# ignore the "DZP-git.9y5u" temp file, ha!
+ at files = $git->ls_files( { others => 1, modified => 1, unmerged => 1 } );
+ok( @files == 1, "No untracked files left" );
+
+sub append_to_file {
+ my ($file, @lines) = @_;
+ open my $fh, '>>', $file or die "can't open $file: $!";
+ print $fh @lines;
+ close $fh;
+}
+
Modified: branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-build-custom/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-build-custom/dist.ini?rev=69154&op=diff
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-build-custom/dist.ini (original)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-build-custom/dist.ini Sun Feb 20 17:30:15 2011
@@ -11,3 +11,5 @@
[FakeRelease]
[Git::CommitBuild]
branch = build-%b
+release_branch = release
+release_message = Release of %v
Added: branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/Changes?rev=69154&op=file
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/Changes (added)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/Changes Sun Feb 20 17:30:15 2011
@@ -1,0 +1,6 @@
+Changes
+
+1.23 2009-11-16 19:15:45 CET
+ - foo
+ - bar
+ - baz
Added: branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/dist.ini?rev=69154&op=file
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/dist.ini (added)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/commit-dirtydir/dist.ini Sun Feb 20 17:30:15 2011
@@ -1,0 +1,12 @@
+name = Foo
+version = 1.23
+author = foobar
+license = Perl_5
+abstract = Test Library
+copyright_holder = foobar
+copyright_year = 2009
+
+[FakeRelease]
+[MyTestArchiver]
+[Git::Commit]
+add_files_in = releases
Added: branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm?rev=69154&op=file
==============================================================================
--- branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm (added)
+++ branches/upstream/libdist-zilla-plugin-git-perl/current/t/lib/Dist/Zilla/Plugin/MyTestArchiver.pm Sun Feb 20 17:30:15 2011
@@ -1,0 +1,29 @@
+#
+# This file is part of Dist-Zilla-Plugin-Git
+#
+# This software is copyright (c) 2009 by Jerome Quelin.
+#
+# This is free software; you can redistribute it and/or modify it under
+# the same terms as the Perl 5 programming language system itself.
+#
+# taken from DZP::ArchiveRelease, thanks CJM!
+package Dist::Zilla::Plugin::MyTestArchiver;
+use Moose;
+use Moose::Autobox;
+use Path::Class::Dir ();
+use File::Copy ();
+
+with 'Dist::Zilla::Role::Releaser';
+
+sub release {
+ my ($self, $tgz) = @_;
+
+ chmod(0444, $tgz);
+ my $dir = 'releases';
+ mkdir $dir or $self->log_fatal( "Unable to create directory $dir: $!" );
+ my $dest = Path::Class::Dir->new( $dir )->file($tgz->basename);
+ File::Copy::move($tgz, $dest) or $self->log_fatal( "Unable to move: $!" );
+ $self->log("Moved $tgz to $dest");
+}
+
+1;
More information about the Pkg-perl-cvs-commits
mailing list