| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::ACPS::Mint; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1558
|
use Moose; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use v5.10; |
|
5
|
|
|
|
|
|
|
use Git::Wrapper; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: init plugin for ACPS |
|
8
|
|
|
|
|
|
|
our $VERSION = '0.30'; # VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::AfterMint'; |
|
11
|
|
|
|
|
|
|
with 'Dist::Zilla::Role::FileGatherer'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use namespace::autoclean; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub after_mint |
|
16
|
|
|
|
|
|
|
{ |
|
17
|
|
|
|
|
|
|
my($self, $opts) = @_; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $git = Git::Wrapper->new($opts->{mint_root}); |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
foreach my $remote ($git->remote('-v')) |
|
22
|
|
|
|
|
|
|
{ |
|
23
|
|
|
|
|
|
|
# TODO maybe also create the cm repo remote |
|
24
|
|
|
|
|
|
|
if($remote =~ /^public\s+(.*):(public_git\/.*\.git) \(push\)$/) |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
|
|
|
|
|
|
my($hostname,$dir) = ($1,$2); |
|
27
|
|
|
|
|
|
|
use autodie qw( :system ); |
|
28
|
|
|
|
|
|
|
system('ssh', $hostname, 'git', "--git-dir=$dir", 'init', '--bare'); |
|
29
|
|
|
|
|
|
|
$git->push(qw( public master )); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub gather_files |
|
36
|
|
|
|
|
|
|
{ |
|
37
|
|
|
|
|
|
|
my($self, $arg) = @_; |
|
38
|
|
|
|
|
|
|
$self->gather_file_travis_yml($arg); |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub gather_file_travis_yml |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
|
|
|
|
|
|
my($self, $arg) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $file = Dist::Zilla::File::InMemory->new({ |
|
46
|
|
|
|
|
|
|
name => '.travis.yml', |
|
47
|
|
|
|
|
|
|
content => join("\n", q{language: perl}, |
|
48
|
|
|
|
|
|
|
q{}, |
|
49
|
|
|
|
|
|
|
q{#install:}, |
|
50
|
|
|
|
|
|
|
q{# - cpanm -n Foo::Bar}, |
|
51
|
|
|
|
|
|
|
q{}, |
|
52
|
|
|
|
|
|
|
q{perl:}, |
|
53
|
|
|
|
|
|
|
(map { " - \"5.$_\""} qw( 10 12 14 16 18 )), |
|
54
|
|
|
|
|
|
|
q{}, |
|
55
|
|
|
|
|
|
|
q{#before_script: /bin/true}, |
|
56
|
|
|
|
|
|
|
q{}, |
|
57
|
|
|
|
|
|
|
q{script: HARNESS_IS_VERBOSE=1 prove -lv t xt}, |
|
58
|
|
|
|
|
|
|
q{}, |
|
59
|
|
|
|
|
|
|
q{#after_script: /bin/true}, |
|
60
|
|
|
|
|
|
|
q{}, |
|
61
|
|
|
|
|
|
|
q{branches:}, |
|
62
|
|
|
|
|
|
|
q{ only:}, |
|
63
|
|
|
|
|
|
|
q{ - master}, |
|
64
|
|
|
|
|
|
|
q{}, |
|
65
|
|
|
|
|
|
|
), |
|
66
|
|
|
|
|
|
|
}); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$self->add_file($file); |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=pod |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 NAME |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Dist::Zilla::Plugin::ACPS::Mint - init plugin for ACPS |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 VERSION |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
version 0.30 |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Standard init plugin for ACPS distros. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Graham Ollis <gollis@sesda3.com> |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This software is copyright (c) 2012 by NASA GSFC. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
101
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
__END__ |
|
107
|
|
|
|
|
|
|
|