line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::UploadToCPAN; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.994'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1961
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::Releaser'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
8005
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has ssh_username => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has copy_destination => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has post_copy_command => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub release { |
23
|
0
|
|
|
0
|
0
|
|
my ($self, $archive) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$self->uploader->upload_file("$archive"); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
29
|
1
|
|
|
1
|
|
252
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Dist::Zilla::Plugin::CSJEWELL::UploadToDPAN - upload the dist to CPAN |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 0.994 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
If loaded, this plugin will allow the F<release> command to upload to a DarkPAN via SSH, |
49
|
|
|
|
|
|
|
and run a command to rebuild the DarkPAN afterwards. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This plugin looks for configuration in your C<dist.ini> or (more |
54
|
|
|
|
|
|
|
likely) C<~/.dzil/config.ini>: |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
[CSJEWELL::UploadToDPAN] |
57
|
|
|
|
|
|
|
ssh_username = root@curtisjewell.website |
58
|
|
|
|
|
|
|
copy_destination = /var/www/darkpan |
59
|
|
|
|
|
|
|
post_copy_command = /root/dpan.sh |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 ssh_username |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 copy_destination |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 post_copy_command |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Curtis Jewell <csjewell@cpan.org> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Curtis Jewell. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
... |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
86
|
|
|
|
|
|
|
|