line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Group::Git::Cmd::Build; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2013-05-20 09:03:03 |
4
|
|
|
|
|
|
|
# Create by: dev |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
828
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
10
|
1
|
|
|
1
|
|
3
|
use version; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
11
|
1
|
|
|
1
|
|
190
|
use Moose::Role; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
use Carp; |
13
|
|
|
|
|
|
|
use Data::Dumper qw/Dumper/; |
14
|
|
|
|
|
|
|
use English qw/ -no_match_vars /; |
15
|
|
|
|
|
|
|
use File::chdir; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = version->new('0.0.2'); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub build { shift->_builder( 'builder', 'Build.PL', @_ ) } |
20
|
|
|
|
|
|
|
sub mvn { shift->_builder( 'mvn' , 'pom.xml' , @_ ) } |
21
|
|
|
|
|
|
|
sub _builder { |
22
|
|
|
|
|
|
|
my ($self, $cmd, $test, $name) = @_; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
return unless -d $name; |
25
|
|
|
|
|
|
|
return unless -f $test; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
local $CWD = $name; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$cmd .= ' ' . join ' ', map { $self->shell_quote } @ARGV; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return `$cmd`; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Group::Git::Cmd::Build - Builds repositories |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This documentation refers to Group::Git::Cmd::Build version 0.0.2 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
use Group::Git::Cmd::Build; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# Brief but working code example(s) here showing the most common usage(s) |
52
|
|
|
|
|
|
|
# This section will be as far as many users bother reading, so make it as |
53
|
|
|
|
|
|
|
# educational and exemplary as possible. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 DESCRIPTION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 C<build <$name> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Builds a repository if it contains a Build.PL or Makefile.PL file |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 C<mvn <$name> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Builds a repository if it contains a pom.xml file |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 C<tag ($name)> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Does the work of finding tags |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
There are no known bugs in this module. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Please report problems to Ivan Wills (ivan.wills@gmail.com). |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Patches are welcome. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Ivan Wills - (ivan.wills@gmail.com) |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). |
99
|
|
|
|
|
|
|
All rights reserved. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
102
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. This program is |
103
|
|
|
|
|
|
|
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
104
|
|
|
|
|
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
105
|
|
|
|
|
|
|
PARTICULAR PURPOSE. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |