line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::Author::GETTY; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:GETTY'; |
3
|
|
|
|
|
|
|
# ABSTRACT: BeLike::GETTY when you build your dists |
4
|
|
|
|
|
|
|
$Dist::Zilla::PluginBundle::Author::GETTY::VERSION = '0.113'; |
5
|
1
|
|
|
1
|
|
1380
|
use Moose; |
|
1
|
|
|
|
|
559848
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
8382
|
use Moose::Autobox; |
|
1
|
|
|
|
|
219139
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
1293
|
use Dist::Zilla; |
|
1
|
|
|
|
|
1248018
|
|
|
1
|
|
|
|
|
123
|
|
8
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::PluginBundle::Easy'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
705
|
use Dist::Zilla::Plugin::TravisCI (); |
|
1
|
|
|
|
|
590152
|
|
|
1
|
|
|
|
|
40
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
518
|
use Dist::Zilla::PluginBundle::Basic; |
|
1
|
|
|
|
|
73074
|
|
|
1
|
|
|
|
|
39
|
|
14
|
1
|
|
|
1
|
|
480
|
use Dist::Zilla::PluginBundle::Git; |
|
1
|
|
|
|
|
510329
|
|
|
1
|
|
|
|
|
2823
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has manual_version => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => 'Bool', |
19
|
|
|
|
|
|
|
lazy => 1, |
20
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{manual_version} }, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has major_version => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => 'Int', |
26
|
|
|
|
|
|
|
lazy => 1, |
27
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{version} || 0 }, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has author => ( |
31
|
|
|
|
|
|
|
is => 'ro', |
32
|
|
|
|
|
|
|
isa => 'Str', |
33
|
|
|
|
|
|
|
lazy => 1, |
34
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{author} || 'GETTY' }, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has installrelease_command => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
isa => 'Str', |
40
|
|
|
|
|
|
|
lazy => 1, |
41
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{installrelease_command} || 'cpanm .' }, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has no_installrelease => ( |
45
|
|
|
|
|
|
|
is => 'ro', |
46
|
|
|
|
|
|
|
isa => 'Bool', |
47
|
|
|
|
|
|
|
lazy => 1, |
48
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_installrelease} }, |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
has release_branch => ( |
52
|
|
|
|
|
|
|
is => 'ro', |
53
|
|
|
|
|
|
|
isa => 'Str', |
54
|
|
|
|
|
|
|
lazy => 1, |
55
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{release_branch} || 'master' }, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
has no_github => ( |
59
|
|
|
|
|
|
|
is => 'ro', |
60
|
|
|
|
|
|
|
isa => 'Bool', |
61
|
|
|
|
|
|
|
lazy => 1, |
62
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_github} }, |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
has no_cpan => ( |
66
|
|
|
|
|
|
|
is => 'ro', |
67
|
|
|
|
|
|
|
isa => 'Bool', |
68
|
|
|
|
|
|
|
lazy => 1, |
69
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_cpan} }, |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
has no_travis => ( |
73
|
|
|
|
|
|
|
is => 'ro', |
74
|
|
|
|
|
|
|
isa => 'Bool', |
75
|
|
|
|
|
|
|
lazy => 1, |
76
|
|
|
|
|
|
|
default => sub { exists $_[0]->payload->{no_travis} ? $_[0]->payload->{no_travis} : 1 }, |
77
|
|
|
|
|
|
|
); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
has no_changelog_from_git => ( |
80
|
|
|
|
|
|
|
is => 'ro', |
81
|
|
|
|
|
|
|
isa => 'Bool', |
82
|
|
|
|
|
|
|
lazy => 1, |
83
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_changelog_from_git} }, |
84
|
|
|
|
|
|
|
); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
has no_changes => ( |
87
|
|
|
|
|
|
|
is => 'ro', |
88
|
|
|
|
|
|
|
isa => 'Bool', |
89
|
|
|
|
|
|
|
lazy => 1, |
90
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_changes} }, |
91
|
|
|
|
|
|
|
); |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
has no_install => ( |
94
|
|
|
|
|
|
|
is => 'ro', |
95
|
|
|
|
|
|
|
isa => 'Bool', |
96
|
|
|
|
|
|
|
lazy => 1, |
97
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_install} }, |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
has no_makemaker => ( |
101
|
|
|
|
|
|
|
is => 'ro', |
102
|
|
|
|
|
|
|
isa => 'Bool', |
103
|
|
|
|
|
|
|
lazy => 1, |
104
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_makemaker} || $_[0]->is_alien || $_[0]->xs }, |
105
|
|
|
|
|
|
|
); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
has no_podweaver => ( |
108
|
|
|
|
|
|
|
is => 'ro', |
109
|
|
|
|
|
|
|
isa => 'Bool', |
110
|
|
|
|
|
|
|
lazy => 1, |
111
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{no_podweaver} }, |
112
|
|
|
|
|
|
|
); |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
has xs => ( |
115
|
|
|
|
|
|
|
is => 'ro', |
116
|
|
|
|
|
|
|
isa => 'Bool', |
117
|
|
|
|
|
|
|
lazy => 1, |
118
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{xs} }, |
119
|
|
|
|
|
|
|
); |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
has is_task => ( |
122
|
|
|
|
|
|
|
is => 'ro', |
123
|
|
|
|
|
|
|
isa => 'Bool', |
124
|
|
|
|
|
|
|
lazy => 1, |
125
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{task} }, |
126
|
|
|
|
|
|
|
); |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
has is_alien => ( |
129
|
|
|
|
|
|
|
is => 'ro', |
130
|
|
|
|
|
|
|
isa => 'Bool', |
131
|
|
|
|
|
|
|
lazy => 1, |
132
|
|
|
|
|
|
|
default => sub { $_[0]->alien_repo ? 1 : 0 }, |
133
|
|
|
|
|
|
|
); |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
has weaver_config => ( |
136
|
|
|
|
|
|
|
is => 'ro', |
137
|
|
|
|
|
|
|
isa => 'Str', |
138
|
|
|
|
|
|
|
lazy => 1, |
139
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{weaver_config} || '@Author::GETTY' }, |
140
|
|
|
|
|
|
|
); |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
my @gather_array_options = qw( exclude_filename exclude_match ); |
143
|
|
|
|
|
|
|
my @gather_array_attributes = map { 'gather_'.$_ } @gather_array_options; |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
for my $attr (@gather_array_attributes) { |
146
|
|
|
|
|
|
|
has $attr => ( |
147
|
|
|
|
|
|
|
is => 'ro', |
148
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
149
|
|
|
|
|
|
|
lazy => 1, |
150
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, |
151
|
|
|
|
|
|
|
); |
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
has gather_include_dotfiles => ( |
155
|
|
|
|
|
|
|
is => 'ro', |
156
|
|
|
|
|
|
|
isa => 'Bool', |
157
|
|
|
|
|
|
|
lazy => 1, |
158
|
|
|
|
|
|
|
default => sub { exists $_[0]->payload->{gather_include_dotfiles} ? $_[0]->payload->{gather_include_dotfiles} : 1 }, |
159
|
|
|
|
|
|
|
); |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
has gather_include_untracked => ( |
162
|
|
|
|
|
|
|
is => 'ro', |
163
|
|
|
|
|
|
|
isa => 'Bool', |
164
|
|
|
|
|
|
|
lazy => 1, |
165
|
|
|
|
|
|
|
default => sub { $_[0]->payload->{gather_include_untracked} }, |
166
|
|
|
|
|
|
|
); |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
my @run_options = qw( after_build before_build before_release release after_release test ); |
169
|
|
|
|
|
|
|
my @run_ways = qw( run run_if_trial run_no_trial run_if_release run_no_release ); |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
my @run_attributes = map { my $o = $_; map { join('_',$_,$o) } @run_ways } @run_options; |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
for my $attr (@run_attributes) { |
174
|
|
|
|
|
|
|
has $attr => ( |
175
|
|
|
|
|
|
|
is => 'ro', |
176
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
177
|
|
|
|
|
|
|
lazy => 1, |
178
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, |
179
|
|
|
|
|
|
|
); |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
my @alien_options = qw( msys repo name bins pattern_prefix pattern_suffix pattern_version pattern autoconf_with_pic isolate_dynamic version_check ); |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
my @alien_attributes = map { 'alien_'.$_ } @alien_options; |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
for my $attr (@alien_attributes) { |
187
|
|
|
|
|
|
|
has $attr => ( |
188
|
|
|
|
|
|
|
is => 'ro', |
189
|
|
|
|
|
|
|
isa => 'Str', |
190
|
|
|
|
|
|
|
lazy => 1, |
191
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : "" }, |
192
|
|
|
|
|
|
|
); |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
has alien_bin_requires => ( |
196
|
|
|
|
|
|
|
is => 'ro', |
197
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
198
|
|
|
|
|
|
|
lazy => 1, |
199
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{alien_bin_requires} ? $_[0]->payload->{alien_bin_requires} : [] }, |
200
|
|
|
|
|
|
|
); |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
my @travis_str_options = ( |
203
|
|
|
|
|
|
|
@Dist::Zilla::Plugin::TravisCI::bools, |
204
|
|
|
|
|
|
|
); |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
my @travis_str_attributes = map { 'travis_'.$_ } @travis_str_options; |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
for my $attr (@travis_str_attributes) { |
209
|
|
|
|
|
|
|
has $attr => ( |
210
|
|
|
|
|
|
|
is => 'ro', |
211
|
|
|
|
|
|
|
isa => 'Str', |
212
|
|
|
|
|
|
|
lazy => 1, |
213
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : "" }, |
214
|
|
|
|
|
|
|
); |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
my @travis_array_options = ( |
218
|
|
|
|
|
|
|
@Dist::Zilla::Plugin::TravisCI::phases, |
219
|
|
|
|
|
|
|
@Dist::Zilla::Plugin::TravisCI::emptymvarrayattr, |
220
|
|
|
|
|
|
|
'irc_template', |
221
|
|
|
|
|
|
|
'perl_version', |
222
|
|
|
|
|
|
|
); |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
my @travis_array_attributes = map { 'travis_'.$_ } @travis_array_options; |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
for my $attr (@travis_array_attributes) { |
227
|
|
|
|
|
|
|
has $attr => ( |
228
|
|
|
|
|
|
|
is => 'ro', |
229
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
230
|
|
|
|
|
|
|
lazy => 1, |
231
|
|
|
|
|
|
|
default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, |
232
|
|
|
|
|
|
|
); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
0
|
|
|
0
|
0
|
|
sub mvp_multivalue_args { @travis_array_attributes, @run_attributes, @gather_array_attributes, 'alien_bin_requires' } |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
sub configure { |
238
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
239
|
|
|
|
|
|
|
|
240
|
0
|
0
|
0
|
|
|
|
$self->log_fatal("you must not specify both weaver_config and is_task") |
241
|
|
|
|
|
|
|
if $self->is_task and $self->weaver_config ne '@Author::GETTY'; |
242
|
|
|
|
|
|
|
|
243
|
0
|
0
|
0
|
|
|
|
$self->log_fatal("you must not specify both author and no_cpan") |
244
|
|
|
|
|
|
|
if $self->no_cpan and $self->author ne 'GETTY'; |
245
|
|
|
|
|
|
|
|
246
|
0
|
0
|
0
|
|
|
|
$self->log_fatal("no_install can't be used together with no_makemaker") |
247
|
|
|
|
|
|
|
if $self->no_install and $self->no_makemaker; |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
$self->add_plugins([ 'Git::GatherDir' => { |
250
|
|
|
|
|
|
|
include_dotfiles => $self->gather_include_dotfiles, |
251
|
|
|
|
|
|
|
include_untracked => $self->gather_include_untracked, |
252
|
0
|
|
|
|
|
|
scalar @{$self->gather_exclude_filename} > 0 ? ( exclude_filename => $self->gather_exclude_filename ) : (), |
253
|
0
|
0
|
|
|
|
|
scalar @{$self->gather_exclude_match} > 0 ? ( exclude_match => $self->gather_exclude_match ) : (), |
|
0
|
0
|
|
|
|
|
|
254
|
|
|
|
|
|
|
}]); |
255
|
|
|
|
|
|
|
|
256
|
0
|
|
|
|
|
|
my @removes = ('GatherDir','PruneCruft'); |
257
|
0
|
0
|
0
|
|
|
|
if ($self->no_cpan || $self->no_makemaker) { |
258
|
0
|
0
|
|
|
|
|
push @removes, 'UploadToCPAN' if $self->no_cpan; |
259
|
0
|
0
|
|
|
|
|
push @removes, 'MakeMaker' if $self->no_makemaker; |
260
|
|
|
|
|
|
|
} |
261
|
0
|
|
|
|
|
|
$self->add_bundle('Filter' => { |
262
|
|
|
|
|
|
|
-bundle => '@Basic', |
263
|
|
|
|
|
|
|
-remove => [@removes], |
264
|
|
|
|
|
|
|
}); |
265
|
|
|
|
|
|
|
|
266
|
0
|
0
|
|
|
|
|
if ($self->xs) { |
267
|
0
|
|
|
|
|
|
$self->add_plugins(qw( |
268
|
|
|
|
|
|
|
ModuleBuildTiny |
269
|
|
|
|
|
|
|
)); |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
|
272
|
0
|
0
|
|
|
|
|
unless ($self->manual_version) { |
273
|
0
|
0
|
|
|
|
|
if ($self->is_task) { |
274
|
|
|
|
|
|
|
my $v_format = q<{{cldr('yyyyMMdd')}}> |
275
|
0
|
|
0
|
|
|
|
. sprintf('.%03u', ($ENV{N} || 0)); |
276
|
|
|
|
|
|
|
|
277
|
0
|
|
|
|
|
|
$self->add_plugins([ |
278
|
|
|
|
|
|
|
AutoVersion => { |
279
|
|
|
|
|
|
|
major => $self->major_version, |
280
|
|
|
|
|
|
|
format => $v_format, |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
]); |
283
|
|
|
|
|
|
|
} else { |
284
|
0
|
|
|
|
|
|
$self->add_plugins([ |
285
|
|
|
|
|
|
|
'Git::NextVersion' => { |
286
|
|
|
|
|
|
|
version_regexp => '^([0-9]+\.[0-9]+)$', |
287
|
|
|
|
|
|
|
} |
288
|
|
|
|
|
|
|
]); |
289
|
|
|
|
|
|
|
} |
290
|
|
|
|
|
|
|
} |
291
|
|
|
|
|
|
|
|
292
|
0
|
|
|
|
|
|
for (@run_options) { |
293
|
0
|
|
|
|
|
|
my $net = $_; |
294
|
0
|
|
|
|
|
|
my $func = 'run_'.$_; |
295
|
0
|
0
|
|
|
|
|
if (@{$self->$func}) { |
|
0
|
|
|
|
|
|
|
296
|
0
|
|
|
|
|
|
my $plugin = join('',map { ucfirst($_) } split(/_/,$_)); |
|
0
|
|
|
|
|
|
|
297
|
0
|
|
|
|
|
|
$self->add_plugins([ |
298
|
|
|
|
|
|
|
'Run::'.$plugin => { |
299
|
|
|
|
|
|
|
run => $self->$func, |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
]); |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
|
305
|
0
|
|
|
|
|
|
$self->add_plugins(qw( |
306
|
|
|
|
|
|
|
PkgVersion |
307
|
|
|
|
|
|
|
MetaConfig |
308
|
|
|
|
|
|
|
MetaJSON |
309
|
|
|
|
|
|
|
PodSyntaxTests |
310
|
|
|
|
|
|
|
)); |
311
|
|
|
|
|
|
|
|
312
|
0
|
0
|
|
|
|
|
$self->add_plugins($self->no_github ? 'Repository' : 'GithubMeta'); |
313
|
|
|
|
|
|
|
|
314
|
0
|
0
|
|
|
|
|
unless ($self->no_travis) { |
315
|
|
|
|
|
|
|
$self->add_plugins([ |
316
|
|
|
|
|
|
|
TravisCI => { |
317
|
|
|
|
|
|
|
( map { |
318
|
0
|
|
|
|
|
|
my $func = 'travis_'.$_; |
319
|
0
|
0
|
|
|
|
|
$self->$func ? ( $_ => $self->$func ) : (); |
320
|
|
|
|
|
|
|
} @travis_str_options ), |
321
|
|
|
|
|
|
|
( map { |
322
|
0
|
|
|
|
|
|
my $func = 'travis_'.$_; |
|
0
|
|
|
|
|
|
|
323
|
0
|
0
|
|
|
|
|
scalar @{$self->$func} ? ( $_ => $self->$func ) : (); |
|
0
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
} @travis_array_options ), |
325
|
|
|
|
|
|
|
}, |
326
|
|
|
|
|
|
|
]); |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
0
|
0
|
|
|
|
|
if ($self->is_alien) { |
330
|
0
|
|
|
|
|
|
my %alien_values; |
331
|
0
|
|
|
|
|
|
for (@alien_options) { |
332
|
0
|
|
|
|
|
|
my $func = 'alien_'.$_; |
333
|
0
|
0
|
0
|
|
|
|
$alien_values{$_} = $self->$func if defined $self->$func && $self->$func ne ''; |
334
|
|
|
|
|
|
|
} |
335
|
0
|
0
|
|
|
|
|
if(@{ $self->alien_bin_requires }) { |
|
0
|
|
|
|
|
|
|
336
|
0
|
|
|
|
|
|
$alien_values{bin_requires} = $self->alien_bin_requires; |
337
|
|
|
|
|
|
|
} |
338
|
|
|
|
|
|
|
$self->add_plugins([ |
339
|
0
|
|
|
|
|
|
'Alien' => \%alien_values, |
340
|
|
|
|
|
|
|
]); |
341
|
|
|
|
|
|
|
} |
342
|
|
|
|
|
|
|
|
343
|
0
|
0
|
0
|
|
|
|
unless ($self->no_installrelease || $self->is_alien) { |
344
|
0
|
|
|
|
|
|
$self->add_plugins([ |
345
|
|
|
|
|
|
|
'InstallRelease' => { |
346
|
|
|
|
|
|
|
install_command => $self->installrelease_command, |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
]); |
349
|
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
|
351
|
0
|
0
|
0
|
|
|
|
unless (!$self->is_alien || $self->no_installrelease) { |
352
|
0
|
|
|
|
|
|
$self->add_plugins([ |
353
|
|
|
|
|
|
|
'Run::Test' => 'AlienInstallTestHack' => { |
354
|
|
|
|
|
|
|
run_if_release => ['./Build install'], |
355
|
|
|
|
|
|
|
}, |
356
|
|
|
|
|
|
|
]); |
357
|
|
|
|
|
|
|
} |
358
|
|
|
|
|
|
|
|
359
|
0
|
0
|
|
|
|
|
unless ($self->no_cpan) { |
360
|
0
|
|
|
|
|
|
$self->add_plugins([ |
361
|
|
|
|
|
|
|
'Authority' => { |
362
|
|
|
|
|
|
|
authority => 'cpan:'.$self->author, |
363
|
|
|
|
|
|
|
do_metadata => 1, |
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
]); |
366
|
|
|
|
|
|
|
} |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
$self->add_plugins([ |
369
|
0
|
|
|
|
|
|
'Git::CheckFor::CorrectBranch' => { |
370
|
|
|
|
|
|
|
release_branch => $self->release_branch, |
371
|
|
|
|
|
|
|
}, |
372
|
|
|
|
|
|
|
]); |
373
|
|
|
|
|
|
|
|
374
|
0
|
|
|
|
|
|
$self->add_plugins('Prereqs::FromCPANfile'); |
375
|
|
|
|
|
|
|
|
376
|
0
|
0
|
|
|
|
|
unless ($self->no_changes) { |
377
|
0
|
0
|
|
|
|
|
if ($self->no_changelog_from_git) { |
378
|
0
|
|
|
|
|
|
$self->add_plugins(qw( |
379
|
|
|
|
|
|
|
NextRelease |
380
|
|
|
|
|
|
|
)); |
381
|
|
|
|
|
|
|
} else { |
382
|
0
|
|
|
|
|
|
$self->add_plugins([ |
383
|
|
|
|
|
|
|
'ChangelogFromGit' => { |
384
|
|
|
|
|
|
|
max_age => 99999, |
385
|
|
|
|
|
|
|
tag_regexp => '^v?(\d.+)$', |
386
|
|
|
|
|
|
|
file_name => 'Changes', |
387
|
|
|
|
|
|
|
wrap_column => 74, |
388
|
|
|
|
|
|
|
debug => 0, |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
]); |
391
|
|
|
|
|
|
|
} |
392
|
|
|
|
|
|
|
} |
393
|
|
|
|
|
|
|
|
394
|
0
|
0
|
|
|
|
|
if ($self->is_task) { |
395
|
0
|
|
|
|
|
|
$self->add_plugins('TaskWeaver'); |
396
|
|
|
|
|
|
|
} else { |
397
|
0
|
0
|
|
|
|
|
unless ($self->no_podweaver) { |
398
|
0
|
|
|
|
|
|
$self->add_plugins([ |
399
|
|
|
|
|
|
|
PodWeaver => { config_plugin => $self->weaver_config } |
400
|
|
|
|
|
|
|
]); |
401
|
|
|
|
|
|
|
} |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
|
404
|
0
|
|
|
|
|
|
$self->add_bundle('@Git' => { |
405
|
|
|
|
|
|
|
tag_format => '%v', |
406
|
|
|
|
|
|
|
push_to => [ qw(origin) ], |
407
|
|
|
|
|
|
|
}); |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
411
|
1
|
|
|
1
|
|
11
|
no Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
412
|
|
|
|
|
|
|
1; |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
__END__ |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
=pod |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head1 NAME |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::GETTY - BeLike::GETTY when you build your dists |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head1 VERSION |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
version 0.113 |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head1 SYNOPSIS |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
name = Your-App |
429
|
|
|
|
|
|
|
author = You User <you@universe.org> |
430
|
|
|
|
|
|
|
license = Perl_5 |
431
|
|
|
|
|
|
|
copyright_holder = You User |
432
|
|
|
|
|
|
|
copyright_year = 2013 |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
[@Author::GETTY] |
435
|
|
|
|
|
|
|
author = YOUONCPAN |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=head1 DESCRIPTION |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
This is the plugin bundle that GETTY uses. You can configure it (given values |
440
|
|
|
|
|
|
|
are default): |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
[@Author::GETTY] |
443
|
|
|
|
|
|
|
author = GETTY |
444
|
|
|
|
|
|
|
release_branch = master |
445
|
|
|
|
|
|
|
weaver_config = @Author::GETTY |
446
|
|
|
|
|
|
|
no_cpan = 0 |
447
|
|
|
|
|
|
|
no_travis = 1 # deactivate by default now |
448
|
|
|
|
|
|
|
no_install = 0 |
449
|
|
|
|
|
|
|
no_makemaker = 0 |
450
|
|
|
|
|
|
|
no_installrelease = 0 |
451
|
|
|
|
|
|
|
no_changes = 0 |
452
|
|
|
|
|
|
|
no_changelog_from_git = 0 |
453
|
|
|
|
|
|
|
no_podweaver = 0 |
454
|
|
|
|
|
|
|
xs = 0 |
455
|
|
|
|
|
|
|
installrelease_command = cpanm . |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
In default configuration it is equivalent to: |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
[@Filter] |
460
|
|
|
|
|
|
|
-bundle = @Basic |
461
|
|
|
|
|
|
|
-remove = GatherDir |
462
|
|
|
|
|
|
|
-remove = PruneCruft |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
[Git::NextVersion] |
465
|
|
|
|
|
|
|
[PkgVersion] |
466
|
|
|
|
|
|
|
[MetaConfig] |
467
|
|
|
|
|
|
|
[MetaJSON] |
468
|
|
|
|
|
|
|
[NextRelease] |
469
|
|
|
|
|
|
|
[PodSyntaxTests] |
470
|
|
|
|
|
|
|
[GithubMeta] |
471
|
|
|
|
|
|
|
[TravisCI] |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
[InstallRelease] |
474
|
|
|
|
|
|
|
install_command = cpanm . |
475
|
|
|
|
|
|
|
|
476
|
|
|
|
|
|
|
[Authority] |
477
|
|
|
|
|
|
|
authority = cpan:GETTY |
478
|
|
|
|
|
|
|
do_metadata = 1 |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
[PodWeaver] |
481
|
|
|
|
|
|
|
config_plugin = @Author::GETTY |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
[Repository] |
484
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
[Git::CheckFor::CorrectBranch] |
486
|
|
|
|
|
|
|
release_branch = master |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
[@Git] |
489
|
|
|
|
|
|
|
tag_format = %v |
490
|
|
|
|
|
|
|
push_to = origin |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
[ChangelogFromGit] |
493
|
|
|
|
|
|
|
max_age = 99999 |
494
|
|
|
|
|
|
|
tag_regexp = ^v(.+)$ |
495
|
|
|
|
|
|
|
file_name = Changes |
496
|
|
|
|
|
|
|
wrap_column = 74 |
497
|
|
|
|
|
|
|
debug = 0 |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
If the C<task> argument is given to the bundle, PodWeaver is replaced with |
500
|
|
|
|
|
|
|
TaskWeaver and Git::NextVersion is replaced with AutoVersion, you can also |
501
|
|
|
|
|
|
|
give independent a bigger major version with C<version>: |
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
[@Author::GETTY] |
504
|
|
|
|
|
|
|
task = 1 |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
If the C<manual_version> argument is given, AutoVersion and Git::NextVersion |
507
|
|
|
|
|
|
|
are omitted. |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
[@Author::GETTY] |
510
|
|
|
|
|
|
|
manual_version = 1.222333 |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
You can also use shortcuts for integrating L<Dist::Zilla::Plugin::Run>: |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
[@Author::GETTY] |
515
|
|
|
|
|
|
|
run_after_build = script/do_this.pl --dir %s --version %s |
516
|
|
|
|
|
|
|
run_before_build = script/do_this.pl --version %s |
517
|
|
|
|
|
|
|
run_before_release = script/myapp_before1.pl %s |
518
|
|
|
|
|
|
|
run_release = deployer.pl --dir %d --tgz %a --name %n --version %v |
519
|
|
|
|
|
|
|
run_after_release = script/myapp_after.pl --archive %s --version %s |
520
|
|
|
|
|
|
|
run_test = script/tester.pl --name %n --version %v some_file.ext |
521
|
|
|
|
|
|
|
run_if_release_test = ./Build install |
522
|
|
|
|
|
|
|
run_if_release_test = make install |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
You can also use add up configuration for L<Dist::Zilla::Plugin::Git::GatherDir>, |
525
|
|
|
|
|
|
|
excluding I<root> or I<prefix>: |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
[@Author::GETTY] |
528
|
|
|
|
|
|
|
gather_include_dotfiles = 1 # activated by default |
529
|
|
|
|
|
|
|
gather_include_untracked = 0 |
530
|
|
|
|
|
|
|
gather_exclude_filename = dir/skip |
531
|
|
|
|
|
|
|
gather_exclude_match = ^local_ |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
You can use all options of L<Dist::Zilla::Plugin::TravisCI> just by prefix |
534
|
|
|
|
|
|
|
them with B<travis_>, like here: |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
[@Author::GETTY] |
537
|
|
|
|
|
|
|
travis_before_install = install_additional_packages.sh |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
It also combines on request with L<Dist::Zilla::Plugin::Alien>, you can set |
540
|
|
|
|
|
|
|
all parameter of the Alien plugin here, just by preceeding with I<alien_>, the |
541
|
|
|
|
|
|
|
only required parameter here is C<alien_repo>: |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
[@Author::GETTY] |
544
|
|
|
|
|
|
|
alien_repo = http://myapp.org/releases |
545
|
|
|
|
|
|
|
alien_bins = myapp myapp_helper |
546
|
|
|
|
|
|
|
alien_name = myapp |
547
|
|
|
|
|
|
|
alien_pattern_prefix = myapp- |
548
|
|
|
|
|
|
|
alien_pattern_version = ([\d\.]+) |
549
|
|
|
|
|
|
|
alien_pattern_suffix = \.tar\.gz |
550
|
|
|
|
|
|
|
alien_pattern = myapp-([\d\.]+)\.tar\.gz |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
=head2 author |
555
|
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
This is used to name the L<CPAN|http://www.cpan.org/> author of the |
557
|
|
|
|
|
|
|
distribution. See L<Dist::Zilla::Plugin::Authority/authority>. |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
=head2 release_branch |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
This variable is used to set the release_branch, only releases on this branch |
562
|
|
|
|
|
|
|
will be allowed. See L<Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch/release_branch>. |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
=head2 weaver_config |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
This defines the L<PodWeaver> config that is used. See B<config_plugin> on |
567
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::PodWeaver>. |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
=head2 no_github |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
If set to 1, this attribute will disable L<Dist::Zilla::Plugin::GithubMeta> and |
572
|
|
|
|
|
|
|
will add L<Dist::Zilla::Plugin::Repository> instead. |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
=head2 no_cpan |
575
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
If set to 1, this attribute will disable L<Dist::Zilla::Plugin::UploadToCPAN>. |
577
|
|
|
|
|
|
|
By default a dzil release would release to L<CPAN|http://www.cpan.org/>. |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
=head2 no_travis |
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
If set to 1, this attribute will disable L<Dist::Zilla::Plugin::TravisCI>. By |
582
|
|
|
|
|
|
|
default a dzil build or release would also generate a B<.travis.yml>. |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
=head2 no_changelog_from_git |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
If set to 1, then L<Dist::Zilla::Plugin::ChangelogFromGit> will be disabled, and |
587
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::NextRelease> will be used instead. |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
=head2 no_changes |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
If set to 1, then neither L<Dist::Zilla::Plugin::ChangelogFromGit> or |
592
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::NextRelease> will be used. |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
=head2 no_podweaver |
595
|
|
|
|
|
|
|
|
596
|
|
|
|
|
|
|
If set to 1, then L<Dist::Zilla::Plugin::PodWeaver> is not used. |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
=head2 xs |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
If set to 1, then L<Dist::Zilla::Plugin::ModuleBuildTiny>. This will also |
601
|
|
|
|
|
|
|
automatically set B<no_makemaker> to 1. |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
=head2 no_install |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
If set to 1, the resulting distribution can't be installed. |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
=head2 no_makemaker |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
If set to 1, the resulting distribution will not use L<Dist::Zilla::Plugin::MakeMaker>. |
610
|
|
|
|
|
|
|
This is an internal function, and you should know what you do, if you activate |
611
|
|
|
|
|
|
|
this flag. |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
=head2 no_installrelease |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
By default, this bundle will install your distribution after the release. If |
616
|
|
|
|
|
|
|
you set this attribute to 1, then this will not happen. See |
617
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::InstallRelease>. |
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
If you use the L<Dist::Zilla::Plugin::Alien> options, then this one will not |
620
|
|
|
|
|
|
|
use L<Dist::Zilla::Plugin::InstallRelease>, instead, it will use the trick |
621
|
|
|
|
|
|
|
mentioned in L<Dist::Zilla::Plugin::Alien/InstallRelease>. |
622
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
=head2 installrelease_command |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
If you don't like the usage of L<App::cpanminus> to install your distribution |
626
|
|
|
|
|
|
|
after install, you can set another command here. See B<install_command> on |
627
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::InstallRelease>. |
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
=head1 SEE ALSO |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::Alien> |
632
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::Authority> |
634
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::BumpVersionFromGit> |
636
|
|
|
|
|
|
|
|
637
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Git> |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::ChangelogFromGit> |
640
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch> |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::GithubMeta> |
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::InstallRelease> |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::MakeMaker::SkipInstall> |
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::PodWeaver> |
650
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::Repository> |
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::Run> |
654
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::TaskWeaver> |
656
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
L<Dist::Zilla::Plugin::TravisCI> |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
=head1 AUTHOR |
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
Torsten Raudssus <torsten@raudss.us> L<http://www.raudss.us/> |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Torsten Raudssus L<http://www.raudss.us/>. |
666
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
668
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
=cut |