| 1 | package Dist::Zilla::Plugin::CSJEWELL::SubversionDist; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.008003; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | with 'Dist::Zilla::Role::Releaser'; | |||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.900'; | |||||||||
| 8 | 1 | $VERSION =~ s/_//sm; | |||||||||
| 9 | |||||||||||
| 10 | 1 | has directory => ( | |||||||||
| 11 | is => 'ro', | ||||||||||
| 12 | isa => 'Str', | ||||||||||
| 13 | required => 1, | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | 1 | has name => ( | |||||||||
| 17 | is => 'ro', | ||||||||||
| 18 | isa => 'Str', | ||||||||||
| 19 | default => 'DZ::Plugin::CSJEWELL::SubversionDist', | ||||||||||
| 20 | ); | ||||||||||
| 21 | |||||||||||
| 22 | 1 | has debug => ( | |||||||||
| 23 | is => 'ro', | ||||||||||
| 24 | isa => 'Bool', | ||||||||||
| 25 | default => 0, | ||||||||||
| 26 | ); | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub release { | ||||||||
|
Subroutine
release: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 29 | 0 | my ( $self, $archive ) = @_; | |||||||||
| 30 | |||||||||||
| 31 | 0 | my $filename = $archive->stringify(); | |||||||||
| 32 | 0 | my $remote_file = $self->directory() . $filename; | |||||||||
| 33 | 0 | my $bot_name = $self->name(); | |||||||||
| 34 | 0 | my ( $release, $version ) = | |||||||||
| 35 | $filename =~ m/([\w-]+)-([\d_.]+)(?:-TRIAL)?.tar.gz/msx; | ||||||||||
| 36 | 0 | $release =~ s/-/::/gms; | |||||||||
| 37 | 0 | my $message = "[$bot_name] Importing upload file for $release $version"; | |||||||||
| 38 | |||||||||||
| 39 | 0 | my $command = qq(svn import $filename $remote_file -m "$message" 2>&1); | |||||||||
| 40 | 0 | ▶ | if ( $self->debug() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 0 | $self->log($command); | |||||||||
| 42 | } else { | ||||||||||
| 43 | 0 | my $i = system $command; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 0 | $self->log('Release file committed to SVN.'); | |||||||||
| 47 | |||||||||||
| 48 | 0 | return 1; | |||||||||
| 49 | } ## end sub release | ||||||||||
| 50 | |||||||||||
| 51 | 1 | __PACKAGE__->meta()->make_immutable(); | |||||||||
| 52 | 1 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 53 | 1 | 1; | |||||||||
| 54 | |||||||||||
| 55 | __END__ | ||||||||||