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