line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Giblog::Command::deploy; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
787
|
use base 'Giblog::Command'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
80
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
7
|
1
|
|
|
1
|
|
4
|
use Mojolicious; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
13
|
|
8
|
1
|
|
|
1
|
|
29
|
use Time::Piece 'localtime'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
9
|
1
|
|
|
1
|
|
65
|
use Getopt::Long 'GetOptions'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
86
|
use Carp 'confess'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
162
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub run { |
14
|
0
|
|
|
0
|
1
|
|
my ($self, @argv) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $api = $self->api; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $deploy_perl_program = $api->rel_file('deploy.pl'); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my @execute_deploy_perl_program = ("$^X", $deploy_perl_program, @argv); |
21
|
0
|
0
|
|
|
|
|
if (system(@execute_deploy_perl_program) == -1) { |
22
|
0
|
|
|
|
|
|
confess "Fail executing the deployment program : @execute_deploy_perl_program : $?"; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=encoding utf8 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Giblog::Command::deploy - Deployment Command |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
L is a command to deploy web sites. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 USAGE |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
giblog deploy |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
L inherits all methods from L and |
45
|
|
|
|
|
|
|
implements the following deploy ones. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 run |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$command->run(@argv); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
C command execute C in the home directory. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
You can write any deployment process in C. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Command line arguments except the ones Giblog uses are passed to C command. |