| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Author::Plicease::Init2 2.73 { |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1269
|
use 5.020; |
|
|
1
|
|
|
|
|
5
|
|
|
4
|
1
|
|
|
1
|
|
11
|
use Moose; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
13
|
|
|
5
|
1
|
|
|
1
|
|
8575
|
use Dist::Zilla::File::InMemory; |
|
|
1
|
|
|
|
|
487119
|
|
|
|
1
|
|
|
|
|
60
|
|
|
6
|
1
|
|
|
1
|
|
1843
|
use Dist::Zilla::File::FromCode; |
|
|
1
|
|
|
|
|
81344
|
|
|
|
1
|
|
|
|
|
57
|
|
|
7
|
1
|
|
|
1
|
|
11
|
use Sub::Exporter::ForMethods qw( method_installer ); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
14
|
|
|
8
|
1
|
|
|
1
|
|
1127
|
use Data::Section { installer => method_installer }, -setup; |
|
|
1
|
|
|
|
|
2229
|
|
|
|
1
|
|
|
|
|
12
|
|
|
9
|
1
|
|
|
1
|
|
955
|
use Dist::Zilla::MintingProfile::Author::Plicease; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
35
|
|
|
10
|
1
|
|
|
1
|
|
866
|
use JSON::PP qw( encode_json ); |
|
|
1
|
|
|
|
|
15565
|
|
|
|
1
|
|
|
|
|
77
|
|
|
11
|
1
|
|
|
1
|
|
8
|
use Encode qw( encode_utf8 ); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
54
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use experimental qw( postderef ); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
10
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: Dist::Zilla initialization tasks for Plicease |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::AfterMint'; |
|
18
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::ModuleMaker'; |
|
19
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::FileGatherer'; |
|
20
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::TextTemplate'; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $chrome; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub chrome |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
0
|
0
|
|
0
|
0
|
|
return $chrome if defined $chrome; |
|
27
|
0
|
|
|
|
|
|
shift->zilla->chrome; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has abstract => ( |
|
31
|
|
|
|
|
|
|
is => 'ro', |
|
32
|
|
|
|
|
|
|
isa => 'Str', |
|
33
|
|
|
|
|
|
|
lazy => 1, |
|
34
|
|
|
|
|
|
|
default => sub { |
|
35
|
|
|
|
|
|
|
my($self) = @_; |
|
36
|
|
|
|
|
|
|
$self->chrome->prompt_str("abstract"); |
|
37
|
|
|
|
|
|
|
}, |
|
38
|
|
|
|
|
|
|
); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
has include_tests => ( |
|
41
|
|
|
|
|
|
|
is => 'ro', |
|
42
|
|
|
|
|
|
|
isa => 'Int', |
|
43
|
|
|
|
|
|
|
lazy => 1, |
|
44
|
|
|
|
|
|
|
default => sub { |
|
45
|
|
|
|
|
|
|
1, |
|
46
|
|
|
|
|
|
|
}, |
|
47
|
|
|
|
|
|
|
); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has type_dzil => ( |
|
50
|
|
|
|
|
|
|
is => 'ro', |
|
51
|
|
|
|
|
|
|
lazy => 1, |
|
52
|
|
|
|
|
|
|
default => sub { |
|
53
|
|
|
|
|
|
|
my $name = shift->zilla->name; |
|
54
|
|
|
|
|
|
|
$name =~ /^Dist-Zilla/ ? 1 : 0; |
|
55
|
|
|
|
|
|
|
}, |
|
56
|
|
|
|
|
|
|
); |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
has type_alien => ( |
|
59
|
|
|
|
|
|
|
is => 'ro', |
|
60
|
|
|
|
|
|
|
lazy => 1, |
|
61
|
|
|
|
|
|
|
default => sub { |
|
62
|
|
|
|
|
|
|
my $name = shift->zilla->name; |
|
63
|
|
|
|
|
|
|
my $alien = $name =~ /^Alien-[A-Za-z0-9]+$/ ? 1 : 0; |
|
64
|
|
|
|
|
|
|
$alien = 0 if $name =~ /^Alien-(Build|Base|Role)-/; |
|
65
|
|
|
|
|
|
|
$alien; |
|
66
|
|
|
|
|
|
|
}, |
|
67
|
|
|
|
|
|
|
); |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has workflow => ( |
|
70
|
|
|
|
|
|
|
is => 'ro', |
|
71
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
|
72
|
|
|
|
|
|
|
lazy => 1, |
|
73
|
|
|
|
|
|
|
default => sub { |
|
74
|
|
|
|
|
|
|
my $self = shift; |
|
75
|
|
|
|
|
|
|
my @workflow; |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
foreach my $workflow (qw( static linux windows macos cygwin msys2-mingw )) |
|
78
|
|
|
|
|
|
|
{ |
|
79
|
|
|
|
|
|
|
push @workflow, $workflow if $self->chrome->prompt_yn("workflow $workflow?"); |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
\@workflow; |
|
83
|
|
|
|
|
|
|
}, |
|
84
|
|
|
|
|
|
|
); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
has irc => ( |
|
87
|
|
|
|
|
|
|
is => 'ro', |
|
88
|
|
|
|
|
|
|
isa => 'Maybe[Str]', |
|
89
|
|
|
|
|
|
|
lazy => 1, |
|
90
|
|
|
|
|
|
|
default => sub { |
|
91
|
|
|
|
|
|
|
my $self = shift; |
|
92
|
|
|
|
|
|
|
return undef unless $self->chrome->prompt_yn("irc?"); |
|
93
|
|
|
|
|
|
|
$self->chrome->prompt_str("irc url", { default => 'irc://irc.perl.org/#native' }); |
|
94
|
|
|
|
|
|
|
}, |
|
95
|
|
|
|
|
|
|
); |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
has perl_version => ( |
|
98
|
|
|
|
|
|
|
is => 'ro', |
|
99
|
|
|
|
|
|
|
lazy => 1, |
|
100
|
|
|
|
|
|
|
default => sub { |
|
101
|
|
|
|
|
|
|
my($self) = @_; |
|
102
|
|
|
|
|
|
|
if(defined $ENV{V} && $ENV{V} =~ /^5\.([0-9]+)$/) |
|
103
|
|
|
|
|
|
|
{ |
|
104
|
|
|
|
|
|
|
return sprintf '5.%03d', $1; |
|
105
|
|
|
|
|
|
|
} |
|
106
|
|
|
|
|
|
|
elsif(defined $ENV{V} && $ENV{V} =~ /^5\.([0-9]+)\.([0-9]+)$/) |
|
107
|
|
|
|
|
|
|
{ |
|
108
|
|
|
|
|
|
|
return sprintf '5.%03d%03d', $1, $2; |
|
109
|
|
|
|
|
|
|
} |
|
110
|
|
|
|
|
|
|
else |
|
111
|
|
|
|
|
|
|
{ |
|
112
|
|
|
|
|
|
|
if($self->type_dzil) |
|
113
|
|
|
|
|
|
|
{ |
|
114
|
|
|
|
|
|
|
return '5.020'; |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
else |
|
117
|
|
|
|
|
|
|
{ |
|
118
|
|
|
|
|
|
|
for(1..100) |
|
119
|
|
|
|
|
|
|
{ |
|
120
|
|
|
|
|
|
|
my $answer = $self->chrome->prompt_str("Minimum required Perl (min: 5.008004, old: 5.014, def: 5.020 (default), or an explicit Perl version)", |
|
121
|
|
|
|
|
|
|
{ default => "def" }, |
|
122
|
|
|
|
|
|
|
); |
|
123
|
|
|
|
|
|
|
return $answer if $answer =~ /^5\.[0-9]{3,6}$/; |
|
124
|
|
|
|
|
|
|
return '5.008004' if $answer eq 'min'; |
|
125
|
|
|
|
|
|
|
return '5.014' if $answer eq 'old'; |
|
126
|
|
|
|
|
|
|
return '5.020' if $answer eq 'def'; |
|
127
|
|
|
|
|
|
|
if($answer =~ /^5\.([0-9]+)\.([0-9]+)$/) |
|
128
|
|
|
|
|
|
|
{ |
|
129
|
|
|
|
|
|
|
return sprintf "5.%03d%03d", $1, $2; |
|
130
|
|
|
|
|
|
|
} |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
die "I give up"; |
|
133
|
|
|
|
|
|
|
} |
|
134
|
|
|
|
|
|
|
} |
|
135
|
|
|
|
|
|
|
}, |
|
136
|
|
|
|
|
|
|
); |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub make_module |
|
139
|
|
|
|
|
|
|
{ |
|
140
|
0
|
|
|
0
|
0
|
|
my($self, $arg) = @_; |
|
141
|
|
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
my $template_name; |
|
143
|
|
|
|
|
|
|
|
|
144
|
0
|
0
|
|
|
|
|
if($self->type_dzil) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
{ |
|
146
|
0
|
|
|
|
|
|
$template_name = 'Dzil.pm'; |
|
147
|
|
|
|
|
|
|
} |
|
148
|
|
|
|
|
|
|
elsif($self->type_alien) |
|
149
|
|
|
|
|
|
|
{ |
|
150
|
0
|
|
|
|
|
|
$template_name = 'Alien.pm'; |
|
151
|
|
|
|
|
|
|
} |
|
152
|
|
|
|
|
|
|
elsif($self->perl_version >= 5.020) |
|
153
|
|
|
|
|
|
|
{ |
|
154
|
0
|
|
|
|
|
|
$template_name = 'P5020.pm'; |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
elsif($self->perl_version >= 5.014) |
|
157
|
|
|
|
|
|
|
{ |
|
158
|
0
|
|
|
|
|
|
$template_name = 'P5014.pm'; |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
else |
|
161
|
|
|
|
|
|
|
{ |
|
162
|
0
|
|
|
|
|
|
$template_name = 'Default.pm'; |
|
163
|
|
|
|
|
|
|
} |
|
164
|
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
(my $filename = $arg->{name}) =~ s{::}{/}g; |
|
166
|
0
|
|
|
|
|
|
$self->gather_file_template($template_name => "lib/$filename.pm"); |
|
167
|
|
|
|
|
|
|
} |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub experimental |
|
170
|
|
|
|
|
|
|
{ |
|
171
|
0
|
|
|
0
|
0
|
|
my($self) = @_; |
|
172
|
|
|
|
|
|
|
|
|
173
|
0
|
|
|
|
|
|
my %x; |
|
174
|
|
|
|
|
|
|
|
|
175
|
0
|
0
|
|
|
|
|
if($self->perl_version >= 5.020) |
|
176
|
|
|
|
|
|
|
{ |
|
177
|
0
|
|
|
|
|
|
$x{signatures} = 1; |
|
178
|
0
|
|
|
|
|
|
$x{postderef} = 1; |
|
179
|
|
|
|
|
|
|
} |
|
180
|
0
|
0
|
|
|
|
|
if($self->perl_version >= 5.024) |
|
181
|
|
|
|
|
|
|
{ |
|
182
|
0
|
|
|
|
|
|
delete $x{postderef}; |
|
183
|
|
|
|
|
|
|
} |
|
184
|
0
|
0
|
|
|
|
|
if($self->perl_version >= 5.032) |
|
185
|
|
|
|
|
|
|
{ |
|
186
|
0
|
|
|
|
|
|
$x{isa} = 1; |
|
187
|
|
|
|
|
|
|
} |
|
188
|
0
|
0
|
|
|
|
|
if($self->perl_version >= 5.034) |
|
189
|
|
|
|
|
|
|
{ |
|
190
|
0
|
|
|
|
|
|
$x{try} = 1; |
|
191
|
|
|
|
|
|
|
} |
|
192
|
0
|
0
|
|
|
|
|
if($self->perl_version >= 5.036) |
|
193
|
|
|
|
|
|
|
{ |
|
194
|
0
|
|
|
|
|
|
$x{defer} = 1; |
|
195
|
0
|
|
|
|
|
|
delete $x{signatures}; |
|
196
|
0
|
|
|
|
|
|
delete $x{isa}; |
|
197
|
|
|
|
|
|
|
} |
|
198
|
|
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
return join(' ', sort keys %x); |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub gather_files |
|
203
|
|
|
|
|
|
|
{ |
|
204
|
0
|
|
|
0
|
0
|
|
my($self, $arg) = @_; |
|
205
|
|
|
|
|
|
|
|
|
206
|
0
|
|
|
|
|
|
$self->gather_file_dist_ini($arg); |
|
207
|
|
|
|
|
|
|
|
|
208
|
0
|
|
|
|
|
|
$self->gather_file_simple ('.gitattributes'); |
|
209
|
0
|
|
|
|
|
|
$self->gather_file_template('.gitignore'); |
|
210
|
0
|
0
|
|
|
|
|
$self->gather_file_simple ('alienfile') if $self->type_alien; |
|
211
|
0
|
|
|
|
|
|
$self->gather_file_simple ('author.yml'); |
|
212
|
0
|
|
|
|
|
|
$self->gather_file_simple ('Changes'); |
|
213
|
0
|
|
|
|
|
|
$self->gather_file_simple ('perlcriticrc'); |
|
214
|
0
|
|
|
|
|
|
$self->gather_file_template('t/main_class.t' => 't/' . lc($self->zilla->name =~ s/-/_/gr) . ".t" ); |
|
215
|
0
|
|
|
|
|
|
$self->gather_file_simple ('xt/author/critic.t'); |
|
216
|
|
|
|
|
|
|
|
|
217
|
0
|
|
|
|
|
|
foreach my $workflow ($self->workflow->@*) |
|
218
|
|
|
|
|
|
|
{ |
|
219
|
0
|
|
|
|
|
|
$self->gather_file_simple(".github/workflows/$workflow.yml"); |
|
220
|
|
|
|
|
|
|
} |
|
221
|
|
|
|
|
|
|
} |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
sub gather_file_simple |
|
224
|
|
|
|
|
|
|
{ |
|
225
|
0
|
|
|
0
|
0
|
|
my($self, $filename) = @_; |
|
226
|
0
|
|
|
|
|
|
my $content = $self->section_data("dist/$filename"); |
|
227
|
0
|
0
|
|
|
|
|
$self->log_fatal("no bundled file dist/$filename") unless $content; |
|
228
|
0
|
|
|
|
|
|
my $file = Dist::Zilla::File::InMemory->new({ |
|
229
|
|
|
|
|
|
|
name => $filename, |
|
230
|
|
|
|
|
|
|
content => $$content, |
|
231
|
|
|
|
|
|
|
}); |
|
232
|
0
|
|
|
|
|
|
$self->add_file($file); |
|
233
|
|
|
|
|
|
|
} |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub gather_file_template |
|
236
|
|
|
|
|
|
|
{ |
|
237
|
0
|
|
|
0
|
0
|
|
my($self, $template_name, $filename) = @_; |
|
238
|
0
|
|
0
|
|
|
|
$filename //= $template_name; |
|
239
|
0
|
|
|
|
|
|
my $template = ${ $self->section_data("template/$template_name") }; |
|
|
0
|
|
|
|
|
|
|
|
240
|
0
|
0
|
|
|
|
|
$self->log_fatal("no bundled template: template/$template_name") unless $template; |
|
241
|
0
|
|
|
|
|
|
my $content = $self->fill_in_string($template, { |
|
242
|
|
|
|
|
|
|
name => $self->zilla->name, |
|
243
|
|
|
|
|
|
|
abstract => $self->abstract, |
|
244
|
|
|
|
|
|
|
perl_version => $self->perl_version, |
|
245
|
|
|
|
|
|
|
experimental => $self->experimental, |
|
246
|
|
|
|
|
|
|
}, {}); |
|
247
|
0
|
|
|
|
|
|
my $file = Dist::Zilla::File::InMemory->new({ |
|
248
|
|
|
|
|
|
|
name => $filename, |
|
249
|
|
|
|
|
|
|
content => $content, |
|
250
|
|
|
|
|
|
|
}); |
|
251
|
0
|
|
|
|
|
|
$self->add_file($file); |
|
252
|
|
|
|
|
|
|
} |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
sub gather_file_dist_ini |
|
255
|
|
|
|
|
|
|
{ |
|
256
|
0
|
|
|
0
|
0
|
|
my($self, $arg) = @_; |
|
257
|
|
|
|
|
|
|
|
|
258
|
0
|
|
|
|
|
|
my $zilla = $self->zilla; |
|
259
|
|
|
|
|
|
|
|
|
260
|
0
|
|
|
|
|
|
my $template = $self->section_data("template/dist.ini"); |
|
261
|
|
|
|
|
|
|
|
|
262
|
0
|
0
|
0
|
|
|
|
my $stash = { |
|
263
|
|
|
|
|
|
|
name => $zilla->name, |
|
264
|
|
|
|
|
|
|
copyright_year => (localtime)[5]+1900, |
|
265
|
|
|
|
|
|
|
version => __PACKAGE__->VERSION // '2.41', |
|
266
|
|
|
|
|
|
|
release_tests => $self->include_tests, |
|
267
|
|
|
|
|
|
|
github_user => $self->github_user, |
|
268
|
|
|
|
|
|
|
version_plugin => ($self->perl_version >= 5.014 ? 'PkgVersion::Block' : 0), |
|
269
|
|
|
|
|
|
|
workflow => $self->workflow, |
|
270
|
|
|
|
|
|
|
irc => $self->irc, |
|
271
|
|
|
|
|
|
|
default_branch => 'main', |
|
272
|
|
|
|
|
|
|
}; |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
my $code = sub { |
|
275
|
0
|
|
|
0
|
|
|
$self->fill_in_string($$template, $stash, {}); |
|
276
|
0
|
|
|
|
|
|
}; |
|
277
|
|
|
|
|
|
|
|
|
278
|
0
|
|
|
|
|
|
my $file = Dist::Zilla::File::FromCode->new({ |
|
279
|
|
|
|
|
|
|
name => 'dist.ini', |
|
280
|
|
|
|
|
|
|
code => $code, |
|
281
|
|
|
|
|
|
|
}); |
|
282
|
|
|
|
|
|
|
|
|
283
|
0
|
|
|
|
|
|
$self->add_file($file); |
|
284
|
|
|
|
|
|
|
} |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
has github => ( |
|
287
|
|
|
|
|
|
|
is => 'ro', |
|
288
|
|
|
|
|
|
|
isa => 'Str', |
|
289
|
|
|
|
|
|
|
lazy => 1, |
|
290
|
|
|
|
|
|
|
default => sub { |
|
291
|
|
|
|
|
|
|
my($self) = @_; |
|
292
|
|
|
|
|
|
|
$self->chrome->prompt_yn("create github repo", { default => 1 }); |
|
293
|
|
|
|
|
|
|
}, |
|
294
|
|
|
|
|
|
|
); |
|
295
|
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
has github_login => ( |
|
297
|
|
|
|
|
|
|
is => 'ro', |
|
298
|
|
|
|
|
|
|
isa => 'Str', |
|
299
|
|
|
|
|
|
|
lazy => 1, |
|
300
|
|
|
|
|
|
|
default => sub { |
|
301
|
|
|
|
|
|
|
my($self) = @_; |
|
302
|
|
|
|
|
|
|
$self->chrome->prompt_str("github login", { default => 'plicease' }); |
|
303
|
|
|
|
|
|
|
}, |
|
304
|
|
|
|
|
|
|
); |
|
305
|
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
has github_user => ( |
|
307
|
|
|
|
|
|
|
is => 'ro', |
|
308
|
|
|
|
|
|
|
isa => 'Str', |
|
309
|
|
|
|
|
|
|
lazy => 1, |
|
310
|
|
|
|
|
|
|
default => sub { |
|
311
|
|
|
|
|
|
|
my($self) = @_; |
|
312
|
|
|
|
|
|
|
$self->chrome->prompt_str("github user/org", { default => 'uperl' }); |
|
313
|
|
|
|
|
|
|
}, |
|
314
|
|
|
|
|
|
|
); |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
has github_private => ( |
|
317
|
|
|
|
|
|
|
is => 'ro', |
|
318
|
|
|
|
|
|
|
isa => 'Str', |
|
319
|
|
|
|
|
|
|
lazy => 1, |
|
320
|
|
|
|
|
|
|
default => sub { |
|
321
|
|
|
|
|
|
|
my($self) = @_; |
|
322
|
|
|
|
|
|
|
$self->chrome->prompt_yn("github private", { default => 0 }); |
|
323
|
|
|
|
|
|
|
}, |
|
324
|
|
|
|
|
|
|
); |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
has github_pass => ( |
|
327
|
|
|
|
|
|
|
is => 'ro', |
|
328
|
|
|
|
|
|
|
isa => 'Str', |
|
329
|
|
|
|
|
|
|
lazy => 1, |
|
330
|
|
|
|
|
|
|
default => sub { |
|
331
|
|
|
|
|
|
|
my($self) = @_; |
|
332
|
|
|
|
|
|
|
$self->chrome->prompt_str("github pass", { noecho => 1 }); |
|
333
|
|
|
|
|
|
|
}, |
|
334
|
|
|
|
|
|
|
); |
|
335
|
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
has github_auth_token => ( |
|
337
|
|
|
|
|
|
|
is => 'ro', |
|
338
|
|
|
|
|
|
|
isa => 'Str', |
|
339
|
|
|
|
|
|
|
lazy => 1, |
|
340
|
|
|
|
|
|
|
default => sub { |
|
341
|
|
|
|
|
|
|
$ENV{DIST_ZILLA_PLUGIN_AUTHOR_PLICEASE_INIT2_GITHUB_OAUTH_TOKEN} // $ENV{GITHUB_OAUTH_TOKEN}; |
|
342
|
|
|
|
|
|
|
}, |
|
343
|
|
|
|
|
|
|
); |
|
344
|
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
sub after_mint |
|
346
|
|
|
|
|
|
|
{ |
|
347
|
0
|
|
|
0
|
0
|
|
my($self, $opts) = @_; |
|
348
|
|
|
|
|
|
|
|
|
349
|
0
|
0
|
|
|
|
|
unless(eval { require Git::Wrapper }) |
|
|
0
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
{ |
|
351
|
0
|
|
|
|
|
|
$self->zilla->log("no Git::Wrapper, can't create repository"); |
|
352
|
0
|
|
|
|
|
|
return; |
|
353
|
|
|
|
|
|
|
} |
|
354
|
|
|
|
|
|
|
|
|
355
|
0
|
|
|
|
|
|
my $git = Git::Wrapper->new($opts->{mint_root}); |
|
356
|
0
|
|
|
|
|
|
$git->init; |
|
357
|
0
|
|
|
|
|
|
$git->checkout( '-b' => 'main' ); |
|
358
|
0
|
|
|
|
|
|
$git->commit({ 'allow-empty' => 1, message => "Start with a blank" }); |
|
359
|
0
|
|
|
|
|
|
$git->add($opts->{mint_root}); |
|
360
|
0
|
|
|
|
|
|
$git->commit({ message => "Initial structure" }); |
|
361
|
|
|
|
|
|
|
|
|
362
|
0
|
0
|
|
|
|
|
unless(eval { require LWP::UserAgent; require HTTP::Request }) |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
{ |
|
364
|
0
|
|
|
|
|
|
$self->zilla->log("no LWP, can't create github repo"); |
|
365
|
|
|
|
|
|
|
} |
|
366
|
|
|
|
|
|
|
|
|
367
|
0
|
|
|
|
|
|
my $no_github = 1; |
|
368
|
|
|
|
|
|
|
|
|
369
|
0
|
0
|
0
|
|
|
|
if($self->github && !$ENV{DIST_ZILLA_PLUGIN_AUTHOR_PLICEASE_INIT2_NO_GITHUB}) |
|
370
|
|
|
|
|
|
|
{ |
|
371
|
0
|
|
|
|
|
|
my $ua = LWP::UserAgent->new; |
|
372
|
0
|
0
|
|
|
|
|
my $org = $self->github_user ne $self->github_login |
|
373
|
|
|
|
|
|
|
? $self->github_user |
|
374
|
|
|
|
|
|
|
: undef; |
|
375
|
0
|
0
|
|
|
|
|
my $url = $org ? "https://api.github.com/orgs/$org/repos" : 'https://api.github.com/user/repos'; |
|
376
|
0
|
|
|
|
|
|
my $request = HTTP::Request->new( |
|
377
|
|
|
|
|
|
|
POST => $url, |
|
378
|
|
|
|
|
|
|
); |
|
379
|
|
|
|
|
|
|
|
|
380
|
0
|
0
|
0
|
|
|
|
my $data = encode_json({ |
|
381
|
|
|
|
|
|
|
name => $self->zilla->name, |
|
382
|
|
|
|
|
|
|
description => $self->abstract, |
|
383
|
|
|
|
|
|
|
private => (!$org && $self->github_private) ? JSON::PP::true : JSON::PP::false, |
|
384
|
|
|
|
|
|
|
has_projects => JSON::PP::false, |
|
385
|
|
|
|
|
|
|
has_wiki => JSON::PP::false, |
|
386
|
|
|
|
|
|
|
allow_squash_merge => JSON::PP::false, |
|
387
|
|
|
|
|
|
|
}); |
|
388
|
0
|
|
|
|
|
|
$request->content($data); |
|
389
|
0
|
|
|
|
|
|
$request->header( 'Content-Length' => length encode_utf8 $data ); |
|
390
|
0
|
0
|
|
|
|
|
if($self->github_auth_token) |
|
391
|
|
|
|
|
|
|
{ |
|
392
|
0
|
|
|
|
|
|
$request->header( 'Authorization' => "token @{[ $self->github_auth_token ]}" ); |
|
|
0
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
} |
|
394
|
|
|
|
|
|
|
else |
|
395
|
|
|
|
|
|
|
{ |
|
396
|
0
|
|
|
|
|
|
$request->authorization_basic($self->github_login, $self->github_pass); |
|
397
|
|
|
|
|
|
|
} |
|
398
|
0
|
|
|
|
|
|
my $response = $ua->request($request); |
|
399
|
0
|
0
|
|
|
|
|
if($response->is_success) |
|
400
|
|
|
|
|
|
|
{ |
|
401
|
0
|
|
|
|
|
|
$self->zilla->log("created repo at https://github.com/@{[ $self->github_user ]}/@{[ $self->zilla->name ]}"); |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
402
|
0
|
|
|
|
|
|
$no_github = 0; |
|
403
|
|
|
|
|
|
|
} |
|
404
|
|
|
|
|
|
|
else |
|
405
|
|
|
|
|
|
|
{ |
|
406
|
0
|
|
|
|
|
|
$self->zilla->log("$url"); |
|
407
|
0
|
|
|
|
|
|
$self->zilla->log("$data"); |
|
408
|
0
|
|
|
|
|
|
$self->zilla->log("@{[ $response->code ]} @{[ $response->status_line ]}"); |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
409
|
0
|
|
|
|
|
|
$self->zilla->log("could not create a github repo!"); |
|
410
|
|
|
|
|
|
|
} |
|
411
|
|
|
|
|
|
|
} |
|
412
|
|
|
|
|
|
|
|
|
413
|
0
|
|
|
|
|
|
$git->remote('add', 'origin', "git\@github.com:" . $self->github_user . '/' . $self->zilla->name . '.git'); |
|
414
|
0
|
0
|
|
|
|
|
$git->push('--set-upstream', 'origin', 'main') unless $no_github; |
|
415
|
|
|
|
|
|
|
|
|
416
|
0
|
|
|
|
|
|
return; |
|
417
|
|
|
|
|
|
|
} |
|
418
|
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
420
|
|
|
|
|
|
|
} |
|
421
|
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
1; |
|
423
|
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Author::Plicease::Init2; |
|
425
|
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=pod |
|
427
|
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=encoding UTF-8 |
|
429
|
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=head1 NAME |
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Author::Plicease::Init2 - Dist::Zilla initialization tasks for Plicease |
|
433
|
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=head1 VERSION |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
version 2.73 |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
439
|
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
Create a dist in plicease style. |
|
441
|
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head1 AUTHOR |
|
443
|
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
Graham Ollis <plicease@cpan.org> |
|
445
|
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
447
|
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
This software is copyright (c) 2012-2022 by Graham Ollis. |
|
449
|
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
451
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
452
|
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
=cut |
|
454
|
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
__DATA__ |
|
456
|
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
__[ dist/alienfile ]__ |
|
459
|
|
|
|
|
|
|
use alienfile; |
|
460
|
|
|
|
|
|
|
plugin 'PkgConfig' => 'libfoo'; |
|
461
|
|
|
|
|
|
|
share { |
|
462
|
|
|
|
|
|
|
plugin Download => ( |
|
463
|
|
|
|
|
|
|
url => 'http://...', |
|
464
|
|
|
|
|
|
|
filter => qr/*\.tar\.gz$/, |
|
465
|
|
|
|
|
|
|
version => qr/([0-9\.]+)/, |
|
466
|
|
|
|
|
|
|
); |
|
467
|
|
|
|
|
|
|
plugin Extract => 'tar.gz'; |
|
468
|
|
|
|
|
|
|
plugin 'Build::Autoconf'; |
|
469
|
|
|
|
|
|
|
}; |
|
470
|
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
__[ dist/author.yml ]__ |
|
473
|
|
|
|
|
|
|
--- |
|
474
|
|
|
|
|
|
|
pod_spelling_system: |
|
475
|
|
|
|
|
|
|
skip: 0 |
|
476
|
|
|
|
|
|
|
# list of words that are spelled correctly |
|
477
|
|
|
|
|
|
|
# (regardless of what spell check thinks) |
|
478
|
|
|
|
|
|
|
# or stuff that I like to spell incorrectly |
|
479
|
|
|
|
|
|
|
# intentionally |
|
480
|
|
|
|
|
|
|
stopwords: [] |
|
481
|
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
pod_coverage: |
|
483
|
|
|
|
|
|
|
skip: 0 |
|
484
|
|
|
|
|
|
|
# format is "Class#method" or "Class",regex allowed |
|
485
|
|
|
|
|
|
|
# for either Class or method. |
|
486
|
|
|
|
|
|
|
private: [] |
|
487
|
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
__[ dist/perlcriticrc ]__ |
|
490
|
|
|
|
|
|
|
severity = 1 |
|
491
|
|
|
|
|
|
|
only = 1 |
|
492
|
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
[Community::ArrayAssignAref] |
|
494
|
|
|
|
|
|
|
[Community::BarewordFilehandles] |
|
495
|
|
|
|
|
|
|
[Community::ConditionalDeclarations] |
|
496
|
|
|
|
|
|
|
[Community::ConditionalImplicitReturn] |
|
497
|
|
|
|
|
|
|
[Community::DeprecatedFeatures] |
|
498
|
|
|
|
|
|
|
[Community::DiscouragedModules] |
|
499
|
|
|
|
|
|
|
[Community::DollarAB] |
|
500
|
|
|
|
|
|
|
[Community::Each] |
|
501
|
|
|
|
|
|
|
[Community::EmptyReturn] |
|
502
|
|
|
|
|
|
|
[Community::IndirectObjectNotation] |
|
503
|
|
|
|
|
|
|
[Community::LexicalForeachIterator] |
|
504
|
|
|
|
|
|
|
[Community::LoopOnHash] |
|
505
|
|
|
|
|
|
|
[Community::ModPerl] |
|
506
|
|
|
|
|
|
|
[Community::OpenArgs] |
|
507
|
|
|
|
|
|
|
[Community::OverloadOptions] |
|
508
|
|
|
|
|
|
|
[Community::POSIXImports] |
|
509
|
|
|
|
|
|
|
[Community::PackageMatchesFilename] |
|
510
|
|
|
|
|
|
|
[Community::PreferredAlternatives] |
|
511
|
|
|
|
|
|
|
[Community::StrictWarnings] |
|
512
|
|
|
|
|
|
|
extra_importers = Test2::V0 |
|
513
|
|
|
|
|
|
|
[Community::Threads] |
|
514
|
|
|
|
|
|
|
[Community::Wantarray] |
|
515
|
|
|
|
|
|
|
[Community::WarningsSwitch] |
|
516
|
|
|
|
|
|
|
[Community::WhileDiamondDefaultAssignment] |
|
517
|
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
[BuiltinFunctions::ProhibitBooleanGrep] |
|
519
|
|
|
|
|
|
|
[BuiltinFunctions::ProhibitStringyEval] |
|
520
|
|
|
|
|
|
|
[BuiltinFunctions::ProhibitStringySplit] |
|
521
|
|
|
|
|
|
|
[BuiltinFunctions::ProhibitVoidGrep] |
|
522
|
|
|
|
|
|
|
[BuiltinFunctions::ProhibitVoidMap] |
|
523
|
|
|
|
|
|
|
[ClassHierarchies::ProhibitExplicitISA] |
|
524
|
|
|
|
|
|
|
[ClassHierarchies::ProhibitOneArgBless] |
|
525
|
|
|
|
|
|
|
[CodeLayout::ProhibitHardTabs] |
|
526
|
|
|
|
|
|
|
allow_leading_tabs = 0 |
|
527
|
|
|
|
|
|
|
[CodeLayout::ProhibitTrailingWhitespace] |
|
528
|
|
|
|
|
|
|
[CodeLayout::RequireConsistentNewlines] |
|
529
|
|
|
|
|
|
|
[ControlStructures::ProhibitLabelsWithSpecialBlockNames] |
|
530
|
|
|
|
|
|
|
[ControlStructures::ProhibitMutatingListFunctions] |
|
531
|
|
|
|
|
|
|
[ControlStructures::ProhibitUnreachableCode] |
|
532
|
|
|
|
|
|
|
[InputOutput::ProhibitBarewordFileHandles] |
|
533
|
|
|
|
|
|
|
[InputOutput::ProhibitJoinedReadline] |
|
534
|
|
|
|
|
|
|
[InputOutput::ProhibitTwoArgOpen] |
|
535
|
|
|
|
|
|
|
[Miscellanea::ProhibitFormats] |
|
536
|
|
|
|
|
|
|
[Miscellanea::ProhibitUselessNoCritic] |
|
537
|
|
|
|
|
|
|
[Modules::ProhibitConditionalUseStatements] |
|
538
|
|
|
|
|
|
|
;[Modules::RequireEndWithOne] |
|
539
|
|
|
|
|
|
|
[Modules::RequireNoMatchVarsWithUseEnglish] |
|
540
|
|
|
|
|
|
|
[Objects::ProhibitIndirectSyntax] |
|
541
|
|
|
|
|
|
|
[RegularExpressions::ProhibitUselessTopic] |
|
542
|
|
|
|
|
|
|
[Subroutines::ProhibitNestedSubs] |
|
543
|
|
|
|
|
|
|
[ValuesAndExpressions::ProhibitLeadingZeros] |
|
544
|
|
|
|
|
|
|
[ValuesAndExpressions::ProhibitMixedBooleanOperators] |
|
545
|
|
|
|
|
|
|
[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator] |
|
546
|
|
|
|
|
|
|
[ValuesAndExpressions::RequireUpperCaseHeredocTerminator] |
|
547
|
|
|
|
|
|
|
[Variables::ProhibitPerl4PackageNames] |
|
548
|
|
|
|
|
|
|
[Variables::ProhibitUnusedVariables] |
|
549
|
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
__[ dist/xt/author/critic.t ]__ |
|
552
|
|
|
|
|
|
|
use Test2::Require::Module 'Test2::Tools::PerlCritic'; |
|
553
|
|
|
|
|
|
|
use Test2::Require::Module 'Perl::Critic'; |
|
554
|
|
|
|
|
|
|
use Test2::Require::Module 'Perl::Critic::Community'; |
|
555
|
|
|
|
|
|
|
use Test2::V0; |
|
556
|
|
|
|
|
|
|
use Perl::Critic; |
|
557
|
|
|
|
|
|
|
use Test2::Tools::PerlCritic; |
|
558
|
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
my $critic = Perl::Critic->new( |
|
560
|
|
|
|
|
|
|
-profile => 'perlcriticrc', |
|
561
|
|
|
|
|
|
|
); |
|
562
|
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
perl_critic_ok ['lib','t'], $critic; |
|
564
|
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
done_testing; |
|
566
|
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
__[ dist/.gitattributes ]__ |
|
569
|
|
|
|
|
|
|
*.pm linguist-language=Perl |
|
570
|
|
|
|
|
|
|
*.t linguist-language=Perl |
|
571
|
|
|
|
|
|
|
*.h linguist-language=C |
|
572
|
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
__[ dist/Changes ]__ |
|
575
|
|
|
|
|
|
|
Revision history for {{$dist->name}} |
|
576
|
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
{{$NEXT}} |
|
578
|
|
|
|
|
|
|
- initial version |
|
579
|
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
__[ template/dist.ini ]__ |
|
582
|
|
|
|
|
|
|
name = {{$name}} |
|
583
|
|
|
|
|
|
|
author = Graham Ollis <plicease@cpan.org> |
|
584
|
|
|
|
|
|
|
license = Perl_5 |
|
585
|
|
|
|
|
|
|
copyright_holder = Graham Ollis |
|
586
|
|
|
|
|
|
|
copyright_year = {{$copyright_year}} |
|
587
|
|
|
|
|
|
|
version = 0.01 |
|
588
|
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
[@Author::Plicease] |
|
590
|
|
|
|
|
|
|
:version = {{$version}} |
|
591
|
|
|
|
|
|
|
release_tests = {{$release_tests}} |
|
592
|
|
|
|
|
|
|
installer = Author::Plicease::MakeMaker |
|
593
|
|
|
|
|
|
|
github_user = {{$github_user}} |
|
594
|
|
|
|
|
|
|
default_branch = {{$default_branch}} |
|
595
|
|
|
|
|
|
|
test2_v0 = 1 |
|
596
|
|
|
|
|
|
|
{{ |
|
597
|
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
my $extra = ''; |
|
599
|
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
foreach my $wf (@workflow) |
|
601
|
|
|
|
|
|
|
{ |
|
602
|
|
|
|
|
|
|
$extra .= "workflow = $wf\n"; |
|
603
|
|
|
|
|
|
|
} |
|
604
|
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
$extra .= "version_plugin = $version_plugin\n" if $version_plugin; |
|
606
|
|
|
|
|
|
|
$extra .= "irc = $irc\n" if $irc; |
|
607
|
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
$extra; |
|
609
|
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
}} |
|
611
|
|
|
|
|
|
|
[Author::Plicease::Core] |
|
612
|
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
[Author::Plicease::Upload] |
|
614
|
|
|
|
|
|
|
cpan = 0 |
|
615
|
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
__[ template/.gitignore ]__ |
|
618
|
|
|
|
|
|
|
{{ $name }}-* |
|
619
|
|
|
|
|
|
|
/.build/ |
|
620
|
|
|
|
|
|
|
*.swp |
|
621
|
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
__[ template/t/main_class.t ]__ |
|
624
|
|
|
|
|
|
|
use Test2::V0 -no_srand => 1; |
|
625
|
|
|
|
|
|
|
use {{ $name =~ s/-/::/gr }}; |
|
626
|
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
ok 1, 'todo'; |
|
628
|
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
done_testing; |
|
630
|
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
__[ template/Default.pm ]__ |
|
633
|
|
|
|
|
|
|
package {{ $name =~ s/-/::/gr }}; |
|
634
|
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
use strict; |
|
636
|
|
|
|
|
|
|
use warnings; |
|
637
|
|
|
|
|
|
|
use {{ $perl_version }}; |
|
638
|
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
# ABSTRACT: {{ $abstract }} |
|
640
|
|
|
|
|
|
|
# VERSION |
|
641
|
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
1; |
|
643
|
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
__[ template/Alien.pm ]__ |
|
646
|
|
|
|
|
|
|
package {{ $name =~ s/-/::/gr }}; |
|
647
|
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
use strict; |
|
649
|
|
|
|
|
|
|
use warnings; |
|
650
|
|
|
|
|
|
|
use {{ $perl_version }}; |
|
651
|
|
|
|
|
|
|
use base qw( Alien::Base ); |
|
652
|
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
# ABSTRACT: {{ $abstract }} |
|
654
|
|
|
|
|
|
|
# VERSION |
|
655
|
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
1; |
|
657
|
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
__[ template/Dzil.pm ]__ |
|
660
|
|
|
|
|
|
|
use warnings; |
|
661
|
|
|
|
|
|
|
use {{ $perl_version }}; |
|
662
|
|
|
|
|
|
|
use experimental qw( {{ $experimental }} ); |
|
663
|
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
package {{ $name =~ s/-/::/gr }} { |
|
665
|
|
|
|
|
|
|
|
|
666
|
|
|
|
|
|
|
use Moose; |
|
667
|
|
|
|
|
|
|
use namespace::autoclean; |
|
668
|
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
# ABSTRACT: {{ $abstract }} |
|
670
|
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
672
|
|
|
|
|
|
|
} |
|
673
|
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
1; |
|
675
|
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
__[ template/P5014.pm ]__ |
|
678
|
|
|
|
|
|
|
use warnings; |
|
679
|
|
|
|
|
|
|
use {{ $perl_version }}; |
|
680
|
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
package {{ $name =~ s/-/::/gr }} { |
|
682
|
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
# ABSTRACT: {{ $abstract }} |
|
684
|
|
|
|
|
|
|
} |
|
685
|
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
1; |
|
687
|
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
__[ template/P5020.pm ]__ |
|
690
|
|
|
|
|
|
|
use warnings; |
|
691
|
|
|
|
|
|
|
use {{ $perl_version }}; |
|
692
|
|
|
|
|
|
|
use experimental qw( {{ $experimental }} ); |
|
693
|
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
package {{ $name =~ s/-/::/gr }} { |
|
695
|
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
# ABSTRACT: {{ $abstract }} |
|
697
|
|
|
|
|
|
|
} |
|
698
|
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
1; |
|
700
|
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
__[ dist/.github/workflows/static.yml ]__ |
|
702
|
|
|
|
|
|
|
name: static |
|
703
|
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
on: |
|
705
|
|
|
|
|
|
|
push: |
|
706
|
|
|
|
|
|
|
branches: |
|
707
|
|
|
|
|
|
|
- '*' |
|
708
|
|
|
|
|
|
|
tags-ignore: |
|
709
|
|
|
|
|
|
|
- '*' |
|
710
|
|
|
|
|
|
|
pull_request: |
|
711
|
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
jobs: |
|
713
|
|
|
|
|
|
|
perl: |
|
714
|
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
runs-on: ubuntu-latest |
|
716
|
|
|
|
|
|
|
|
|
717
|
|
|
|
|
|
|
env: |
|
718
|
|
|
|
|
|
|
CIP_TAG: static |
|
719
|
|
|
|
|
|
|
|
|
720
|
|
|
|
|
|
|
steps: |
|
721
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
722
|
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
- name: Bootstrap CIP |
|
724
|
|
|
|
|
|
|
run: | |
|
725
|
|
|
|
|
|
|
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash |
|
726
|
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
- name: Build + Test |
|
728
|
|
|
|
|
|
|
run: | |
|
729
|
|
|
|
|
|
|
cip script |
|
730
|
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
|
|
732
|
|
|
|
|
|
|
__[ dist/.github/workflows/linux.yml ]__ |
|
733
|
|
|
|
|
|
|
name: linux |
|
734
|
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
on: |
|
736
|
|
|
|
|
|
|
push: |
|
737
|
|
|
|
|
|
|
branches: |
|
738
|
|
|
|
|
|
|
- '*' |
|
739
|
|
|
|
|
|
|
tags-ignore: |
|
740
|
|
|
|
|
|
|
- '*' |
|
741
|
|
|
|
|
|
|
pull_request: |
|
742
|
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
jobs: |
|
744
|
|
|
|
|
|
|
perl: |
|
745
|
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
runs-on: ubuntu-latest |
|
747
|
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
strategy: |
|
749
|
|
|
|
|
|
|
fail-fast: false |
|
750
|
|
|
|
|
|
|
matrix: |
|
751
|
|
|
|
|
|
|
cip_tag: |
|
752
|
|
|
|
|
|
|
- "5.37" |
|
753
|
|
|
|
|
|
|
- "5.36" |
|
754
|
|
|
|
|
|
|
- "5.34" |
|
755
|
|
|
|
|
|
|
- "5.32" |
|
756
|
|
|
|
|
|
|
- "5.30" |
|
757
|
|
|
|
|
|
|
- "5.28" |
|
758
|
|
|
|
|
|
|
- "5.26" |
|
759
|
|
|
|
|
|
|
- "5.24" |
|
760
|
|
|
|
|
|
|
- "5.22" |
|
761
|
|
|
|
|
|
|
- "5.20" |
|
762
|
|
|
|
|
|
|
- "5.18" |
|
763
|
|
|
|
|
|
|
- "5.16" |
|
764
|
|
|
|
|
|
|
- "5.14" |
|
765
|
|
|
|
|
|
|
- "5.12" |
|
766
|
|
|
|
|
|
|
- "5.10" |
|
767
|
|
|
|
|
|
|
- "5.8" |
|
768
|
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
env: |
|
770
|
|
|
|
|
|
|
CIP_TAG: ${{ matrix.cip_tag }} |
|
771
|
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
steps: |
|
773
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
774
|
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
- name: Bootstrap CIP |
|
776
|
|
|
|
|
|
|
run: | |
|
777
|
|
|
|
|
|
|
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash |
|
778
|
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
- name: Cache-Key |
|
780
|
|
|
|
|
|
|
id: cache-key |
|
781
|
|
|
|
|
|
|
run: | |
|
782
|
|
|
|
|
|
|
echo -n '::set-output name=key::' |
|
783
|
|
|
|
|
|
|
cip cache-key |
|
784
|
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
- name: Cache CPAN modules |
|
786
|
|
|
|
|
|
|
uses: actions/cache@v2 |
|
787
|
|
|
|
|
|
|
with: |
|
788
|
|
|
|
|
|
|
path: ~/.cip |
|
789
|
|
|
|
|
|
|
key: ${{ runner.os }}-build-${{ steps.cache-key.outputs.key }} |
|
790
|
|
|
|
|
|
|
restore-keys: | |
|
791
|
|
|
|
|
|
|
${{ runner.os }}-build-${{ steps.cache-key.outputs.key }} |
|
792
|
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
- name: Start-Container |
|
794
|
|
|
|
|
|
|
run: | |
|
795
|
|
|
|
|
|
|
cip start |
|
796
|
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
- name: Diagnostics |
|
798
|
|
|
|
|
|
|
run: | |
|
799
|
|
|
|
|
|
|
cip diag |
|
800
|
|
|
|
|
|
|
|
|
801
|
|
|
|
|
|
|
- name: Install-Dependencies |
|
802
|
|
|
|
|
|
|
run: | |
|
803
|
|
|
|
|
|
|
cip install |
|
804
|
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
- name: Build + Test |
|
806
|
|
|
|
|
|
|
run: | |
|
807
|
|
|
|
|
|
|
cip script |
|
808
|
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
- name: CPAN log |
|
810
|
|
|
|
|
|
|
if: ${{ failure() }} |
|
811
|
|
|
|
|
|
|
run: | |
|
812
|
|
|
|
|
|
|
cip exec bash -c 'cat $HOME/.cpanm/latest-build/build.log' |
|
813
|
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
__[ dist/.github/workflows/windows.yml ]__ |
|
816
|
|
|
|
|
|
|
name: windows |
|
817
|
|
|
|
|
|
|
|
|
818
|
|
|
|
|
|
|
on: |
|
819
|
|
|
|
|
|
|
push: |
|
820
|
|
|
|
|
|
|
branches: |
|
821
|
|
|
|
|
|
|
- '*' |
|
822
|
|
|
|
|
|
|
tags-ignore: |
|
823
|
|
|
|
|
|
|
- '*' |
|
824
|
|
|
|
|
|
|
pull_request: |
|
825
|
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
env: |
|
827
|
|
|
|
|
|
|
PERL5LIB: c:\cx\lib\perl5 |
|
828
|
|
|
|
|
|
|
PERL_LOCAL_LIB_ROOT: c:/cx |
|
829
|
|
|
|
|
|
|
PERL_MB_OPT: --install_base C:/cx |
|
830
|
|
|
|
|
|
|
PERL_MM_OPT: INSTALL_BASE=C:/cx |
|
831
|
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
jobs: |
|
833
|
|
|
|
|
|
|
perl: |
|
834
|
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
runs-on: windows-latest |
|
836
|
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
strategy: |
|
838
|
|
|
|
|
|
|
fail-fast: false |
|
839
|
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
steps: |
|
841
|
|
|
|
|
|
|
- name: Set git to use LF |
|
842
|
|
|
|
|
|
|
run: | |
|
843
|
|
|
|
|
|
|
git config --global core.autocrlf false |
|
844
|
|
|
|
|
|
|
git config --global core.eol lf |
|
845
|
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
847
|
|
|
|
|
|
|
|
|
848
|
|
|
|
|
|
|
- name: Set up Perl |
|
849
|
|
|
|
|
|
|
run: | |
|
850
|
|
|
|
|
|
|
choco install strawberryperl |
|
851
|
|
|
|
|
|
|
echo "C:\cx\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
|
852
|
|
|
|
|
|
|
echo "C:\strawberry\c\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
|
853
|
|
|
|
|
|
|
echo "C:\strawberry\perl\site\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
|
854
|
|
|
|
|
|
|
echo "C:\strawberry\perl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
|
855
|
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
- name: Prepare for cache |
|
857
|
|
|
|
|
|
|
run: | |
|
858
|
|
|
|
|
|
|
perl -V > perlversion.txt |
|
859
|
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
- name: Cache CPAN modules |
|
861
|
|
|
|
|
|
|
uses: actions/cache@v1 |
|
862
|
|
|
|
|
|
|
env: |
|
863
|
|
|
|
|
|
|
cache-name: cache-cpan-modules |
|
864
|
|
|
|
|
|
|
with: |
|
865
|
|
|
|
|
|
|
path: c:\cx |
|
866
|
|
|
|
|
|
|
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} |
|
867
|
|
|
|
|
|
|
restore-keys: | |
|
868
|
|
|
|
|
|
|
${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} |
|
869
|
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
- name: perl -V |
|
871
|
|
|
|
|
|
|
run: perl -V |
|
872
|
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
- name: Install Static Dependencies |
|
874
|
|
|
|
|
|
|
run: | |
|
875
|
|
|
|
|
|
|
cpanm -n Dist::Zilla |
|
876
|
|
|
|
|
|
|
dzil authordeps --missing | cpanm -n |
|
877
|
|
|
|
|
|
|
dzil listdeps --missing | cpanm -n |
|
878
|
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
- name: Install Dynamic Dependencies |
|
880
|
|
|
|
|
|
|
run: dzil run --no-build 'cpanm --installdeps .' |
|
881
|
|
|
|
|
|
|
|
|
882
|
|
|
|
|
|
|
- name: Run Tests |
|
883
|
|
|
|
|
|
|
run: dzil test -v |
|
884
|
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
__[ dist/.github/workflows/macos.yml ]__ |
|
887
|
|
|
|
|
|
|
name: macos |
|
888
|
|
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
on: |
|
890
|
|
|
|
|
|
|
push: |
|
891
|
|
|
|
|
|
|
branches: |
|
892
|
|
|
|
|
|
|
- '*' |
|
893
|
|
|
|
|
|
|
tags-ignore: |
|
894
|
|
|
|
|
|
|
- '*' |
|
895
|
|
|
|
|
|
|
pull_request: |
|
896
|
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
env: |
|
898
|
|
|
|
|
|
|
PERL5LIB: /Users/runner/perl5/lib/perl5 |
|
899
|
|
|
|
|
|
|
PERL_LOCAL_LIB_ROOT: /Users/runner/perl5 |
|
900
|
|
|
|
|
|
|
PERL_MB_OPT: --install_base /Users/runner/perl5 |
|
901
|
|
|
|
|
|
|
PERL_MM_OPT: INSTALL_BASE=/Users/runner/perl5 |
|
902
|
|
|
|
|
|
|
|
|
903
|
|
|
|
|
|
|
jobs: |
|
904
|
|
|
|
|
|
|
perl: |
|
905
|
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
runs-on: macOS-latest |
|
907
|
|
|
|
|
|
|
|
|
908
|
|
|
|
|
|
|
strategy: |
|
909
|
|
|
|
|
|
|
fail-fast: false |
|
910
|
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
steps: |
|
912
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
913
|
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
- name: Set up Perl |
|
915
|
|
|
|
|
|
|
run: | |
|
916
|
|
|
|
|
|
|
brew install perl |
|
917
|
|
|
|
|
|
|
curl https://cpanmin.us | perl - App::cpanminus -n |
|
918
|
|
|
|
|
|
|
echo "/Users/runner/perl5/bin" >> $GITHUB_PATH |
|
919
|
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
- name: perl -V |
|
921
|
|
|
|
|
|
|
run: perl -V |
|
922
|
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
- name: Prepare for cache |
|
924
|
|
|
|
|
|
|
run: | |
|
925
|
|
|
|
|
|
|
perl -V > perlversion.txt |
|
926
|
|
|
|
|
|
|
ls -l perlversion.txt |
|
927
|
|
|
|
|
|
|
|
|
928
|
|
|
|
|
|
|
- name: Cache CPAN modules |
|
929
|
|
|
|
|
|
|
uses: actions/cache@v1 |
|
930
|
|
|
|
|
|
|
with: |
|
931
|
|
|
|
|
|
|
path: ~/perl5 |
|
932
|
|
|
|
|
|
|
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} |
|
933
|
|
|
|
|
|
|
restore-keys: | |
|
934
|
|
|
|
|
|
|
${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }} |
|
935
|
|
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
- name: Install Static Dependencies |
|
937
|
|
|
|
|
|
|
run: | |
|
938
|
|
|
|
|
|
|
cpanm -n Dist::Zilla |
|
939
|
|
|
|
|
|
|
dzil authordeps --missing | cpanm -n |
|
940
|
|
|
|
|
|
|
dzil listdeps --missing | cpanm -n |
|
941
|
|
|
|
|
|
|
|
|
942
|
|
|
|
|
|
|
- name: Install Dynamic Dependencies |
|
943
|
|
|
|
|
|
|
run: dzil run --no-build 'cpanm --installdeps .' |
|
944
|
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
- name: Run Tests |
|
946
|
|
|
|
|
|
|
run: dzil test -v |
|
947
|
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
- name: CPAN log |
|
949
|
|
|
|
|
|
|
if: ${{ failure() }} |
|
950
|
|
|
|
|
|
|
run: | |
|
951
|
|
|
|
|
|
|
cat ~/.cpanm/latest-build/build.log |
|
952
|
|
|
|
|
|
|
|
|
953
|
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
__[ dist/.github/workflows/cygwin.yml ]__ |
|
955
|
|
|
|
|
|
|
name: cygwin |
|
956
|
|
|
|
|
|
|
|
|
957
|
|
|
|
|
|
|
on: |
|
958
|
|
|
|
|
|
|
push: |
|
959
|
|
|
|
|
|
|
branches: |
|
960
|
|
|
|
|
|
|
- '*' |
|
961
|
|
|
|
|
|
|
tags-ignore: |
|
962
|
|
|
|
|
|
|
- '*' |
|
963
|
|
|
|
|
|
|
pull_request: |
|
964
|
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
env: |
|
966
|
|
|
|
|
|
|
PERL5LIB: /cygdrive/c/cx/lib/perl5 |
|
967
|
|
|
|
|
|
|
PERL_LOCAL_LIB_ROOT: /cygdrive/cx |
|
968
|
|
|
|
|
|
|
PERL_MB_OPT: --install_base /cygdrive/c/cx |
|
969
|
|
|
|
|
|
|
PERL_MM_OPT: INSTALL_BASE=/cygdrive/c/cx |
|
970
|
|
|
|
|
|
|
ALIEN_BUILD_PLUGIN_PKGCONFIG_COMMANDLINE_TEST: 1 # Test Alien::Build::Plugin::PkgConfig::CommandLine |
|
971
|
|
|
|
|
|
|
CYGWIN_NOWINPATH: 1 |
|
972
|
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
jobs: |
|
974
|
|
|
|
|
|
|
perl: |
|
975
|
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
runs-on: windows-latest |
|
977
|
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
strategy: |
|
979
|
|
|
|
|
|
|
fail-fast: false |
|
980
|
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
defaults: |
|
982
|
|
|
|
|
|
|
run: |
|
983
|
|
|
|
|
|
|
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' |
|
984
|
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
steps: |
|
986
|
|
|
|
|
|
|
- name: Set git to use LF |
|
987
|
|
|
|
|
|
|
run: | |
|
988
|
|
|
|
|
|
|
git config --global core.autocrlf false |
|
989
|
|
|
|
|
|
|
git config --global core.eol lf |
|
990
|
|
|
|
|
|
|
shell: powershell |
|
991
|
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
993
|
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
- name: Set up Cygwin |
|
995
|
|
|
|
|
|
|
uses: egor-tensin/setup-cygwin@v3 |
|
996
|
|
|
|
|
|
|
with: |
|
997
|
|
|
|
|
|
|
platform: x64 |
|
998
|
|
|
|
|
|
|
packages: make perl gcc-core gcc-g++ pkg-config libcrypt-devel libssl-devel git |
|
999
|
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
- name: perl -V |
|
1001
|
|
|
|
|
|
|
run: | |
|
1002
|
|
|
|
|
|
|
perl -V |
|
1003
|
|
|
|
|
|
|
gcc --version |
|
1004
|
|
|
|
|
|
|
|
|
1005
|
|
|
|
|
|
|
- name: Prepare for cache |
|
1006
|
|
|
|
|
|
|
run: | |
|
1007
|
|
|
|
|
|
|
perl -V > perlversion.txt |
|
1008
|
|
|
|
|
|
|
gcc --version >> perlversion.txt |
|
1009
|
|
|
|
|
|
|
ls perlversion.txt |
|
1010
|
|
|
|
|
|
|
|
|
1011
|
|
|
|
|
|
|
- name: Cache CPAN modules |
|
1012
|
|
|
|
|
|
|
uses: actions/cache@v1 |
|
1013
|
|
|
|
|
|
|
with: |
|
1014
|
|
|
|
|
|
|
path: c:\cx |
|
1015
|
|
|
|
|
|
|
key: ${{ runner.os }}-build-cygwin-${{ hashFiles('perlversion.txt') }} |
|
1016
|
|
|
|
|
|
|
restore-keys: | |
|
1017
|
|
|
|
|
|
|
${{ runner.os }}-build-cygwin-${{ hashFiles('perlversion.txt') }} |
|
1018
|
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
- name: Install Static Dependencies |
|
1020
|
|
|
|
|
|
|
run: | |
|
1021
|
|
|
|
|
|
|
export PATH="/cygdrive/c/cx/bin:$PATH" |
|
1022
|
|
|
|
|
|
|
cd $( cygpath -u $GITHUB_WORKSPACE ) |
|
1023
|
|
|
|
|
|
|
yes | cpan App::cpanminus || true |
|
1024
|
|
|
|
|
|
|
cpanm -n Dist::Zilla |
|
1025
|
|
|
|
|
|
|
perl -S dzil authordeps --missing | perl -S cpanm -n |
|
1026
|
|
|
|
|
|
|
perl -S dzil listdeps --missing | perl -S cpanm -n |
|
1027
|
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
- name: Install Dynamic Dependencies |
|
1029
|
|
|
|
|
|
|
run: | |
|
1030
|
|
|
|
|
|
|
export PATH="/cygdrive/c/cx/bin:$PATH" |
|
1031
|
|
|
|
|
|
|
cd $( cygpath -u $GITHUB_WORKSPACE ) |
|
1032
|
|
|
|
|
|
|
perl -S dzil run --no-build 'perl -S cpanm --installdeps .' |
|
1033
|
|
|
|
|
|
|
|
|
1034
|
|
|
|
|
|
|
- name: Run Tests |
|
1035
|
|
|
|
|
|
|
run: | |
|
1036
|
|
|
|
|
|
|
export PATH="/cygdrive/c/cx/bin:$PATH" |
|
1037
|
|
|
|
|
|
|
cd $( cygpath -u $GITHUB_WORKSPACE ) |
|
1038
|
|
|
|
|
|
|
perl -S dzil test -v |
|
1039
|
|
|
|
|
|
|
|
|
1040
|
|
|
|
|
|
|
- name: CPAN log |
|
1041
|
|
|
|
|
|
|
if: ${{ failure() }} |
|
1042
|
|
|
|
|
|
|
run: | |
|
1043
|
|
|
|
|
|
|
cat ~/.cpanm/latest-build/build.log |
|
1044
|
|
|
|
|
|
|
|
|
1045
|
|
|
|
|
|
|
|
|
1046
|
|
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
__[ dist/.github/workflows/msys2-mingw.yml ]__ |
|
1048
|
|
|
|
|
|
|
name: msys2-mingw |
|
1049
|
|
|
|
|
|
|
|
|
1050
|
|
|
|
|
|
|
on: |
|
1051
|
|
|
|
|
|
|
push: |
|
1052
|
|
|
|
|
|
|
branches: |
|
1053
|
|
|
|
|
|
|
- '*' |
|
1054
|
|
|
|
|
|
|
tags-ignore: |
|
1055
|
|
|
|
|
|
|
- '*' |
|
1056
|
|
|
|
|
|
|
pull_request: |
|
1057
|
|
|
|
|
|
|
|
|
1058
|
|
|
|
|
|
|
env: |
|
1059
|
|
|
|
|
|
|
PERL5LIB: /c/cx/lib/perl5:/c/cx/lib/perl5/MSWin32-x64-multi-thread |
|
1060
|
|
|
|
|
|
|
PERL_LOCAL_LIB_ROOT: c:/cx |
|
1061
|
|
|
|
|
|
|
PERL_MB_OPT: --install_base C:/cx |
|
1062
|
|
|
|
|
|
|
PERL_MM_OPT: INSTALL_BASE=C:/cx |
|
1063
|
|
|
|
|
|
|
ALIEN_BUILD_PLUGIN_PKGCONFIG_COMMANDLINE_TEST: 1 # Test Alien::Build::Plugin::PkgConfig::CommandLine |
|
1064
|
|
|
|
|
|
|
|
|
1065
|
|
|
|
|
|
|
jobs: |
|
1066
|
|
|
|
|
|
|
perl: |
|
1067
|
|
|
|
|
|
|
|
|
1068
|
|
|
|
|
|
|
runs-on: windows-latest |
|
1069
|
|
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
strategy: |
|
1071
|
|
|
|
|
|
|
fail-fast: false |
|
1072
|
|
|
|
|
|
|
|
|
1073
|
|
|
|
|
|
|
defaults: |
|
1074
|
|
|
|
|
|
|
run: |
|
1075
|
|
|
|
|
|
|
shell: msys2 {0} |
|
1076
|
|
|
|
|
|
|
|
|
1077
|
|
|
|
|
|
|
steps: |
|
1078
|
|
|
|
|
|
|
- name: Set git to use LF |
|
1079
|
|
|
|
|
|
|
run: | |
|
1080
|
|
|
|
|
|
|
git config --global core.autocrlf false |
|
1081
|
|
|
|
|
|
|
git config --global core.eol lf |
|
1082
|
|
|
|
|
|
|
shell: powershell |
|
1083
|
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
1085
|
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
- name: Set up Perl |
|
1087
|
|
|
|
|
|
|
uses: msys2/setup-msys2@v2 |
|
1088
|
|
|
|
|
|
|
with: |
|
1089
|
|
|
|
|
|
|
update: true |
|
1090
|
|
|
|
|
|
|
install: >- |
|
1091
|
|
|
|
|
|
|
base-devel |
|
1092
|
|
|
|
|
|
|
mingw-w64-x86_64-toolchain |
|
1093
|
|
|
|
|
|
|
mingw-w64-x86_64-perl |
|
1094
|
|
|
|
|
|
|
|
|
1095
|
|
|
|
|
|
|
- name: perl -V |
|
1096
|
|
|
|
|
|
|
run: | |
|
1097
|
|
|
|
|
|
|
perl -V |
|
1098
|
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
- name: Prepare for cache |
|
1100
|
|
|
|
|
|
|
run: | |
|
1101
|
|
|
|
|
|
|
perl -V > perlversion.txt |
|
1102
|
|
|
|
|
|
|
ls perlversion.txt |
|
1103
|
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
- name: Cache CPAN modules |
|
1105
|
|
|
|
|
|
|
uses: actions/cache@v1 |
|
1106
|
|
|
|
|
|
|
with: |
|
1107
|
|
|
|
|
|
|
path: c:\cx |
|
1108
|
|
|
|
|
|
|
key: ${{ runner.os }}-build-msys2-${{ hashFiles('perlversion.txt') }} |
|
1109
|
|
|
|
|
|
|
restore-keys: | |
|
1110
|
|
|
|
|
|
|
${{ runner.os }}-build-msys2-${{ hashFiles('perlversion.txt') }} |
|
1111
|
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
- name: Install Static Dependencies |
|
1113
|
|
|
|
|
|
|
run: | |
|
1114
|
|
|
|
|
|
|
export PATH="/c/cx/bin:$PATH" |
|
1115
|
|
|
|
|
|
|
yes | cpan App::cpanminus || true |
|
1116
|
|
|
|
|
|
|
cpanm -n Dist::Zilla |
|
1117
|
|
|
|
|
|
|
perl -S dzil authordeps --missing | perl -S cpanm -n |
|
1118
|
|
|
|
|
|
|
perl -S dzil listdeps --missing | perl -S cpanm -n |
|
1119
|
|
|
|
|
|
|
|
|
1120
|
|
|
|
|
|
|
- name: Install Dynamic Dependencies |
|
1121
|
|
|
|
|
|
|
run: | |
|
1122
|
|
|
|
|
|
|
export PATH="/c/cx/bin:$PATH" |
|
1123
|
|
|
|
|
|
|
perl -S dzil run --no-build 'perl -S cpanm --installdeps .' |
|
1124
|
|
|
|
|
|
|
|
|
1125
|
|
|
|
|
|
|
- name: Run Tests |
|
1126
|
|
|
|
|
|
|
run: | |
|
1127
|
|
|
|
|
|
|
export PATH="/c/cx/bin:$PATH" |
|
1128
|
|
|
|
|
|
|
perl -S dzil test -v |