| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Statocles::Deploy; |
|
2
|
|
|
|
|
|
|
our $VERSION = '0.085'; |
|
3
|
|
|
|
|
|
|
# ABSTRACT: Base role for ways to deploy a site |
|
4
|
|
|
|
|
|
|
|
|
5
|
58
|
|
|
58
|
|
38167
|
use Statocles::Base 'Role'; |
|
|
58
|
|
|
|
|
140
|
|
|
|
58
|
|
|
|
|
458
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#pod =attr base_url |
|
8
|
|
|
|
|
|
|
#pod |
|
9
|
|
|
|
|
|
|
#pod The base URL for this deploy. Site URLs will be automatically rewritten to be |
|
10
|
|
|
|
|
|
|
#pod based on this URL. |
|
11
|
|
|
|
|
|
|
#pod |
|
12
|
|
|
|
|
|
|
#pod This allows you to have different versions of the site deployed to different |
|
13
|
|
|
|
|
|
|
#pod URLs. |
|
14
|
|
|
|
|
|
|
#pod |
|
15
|
|
|
|
|
|
|
#pod =cut |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has base_url => ( |
|
18
|
|
|
|
|
|
|
is => 'ro', |
|
19
|
|
|
|
|
|
|
isa => Str, |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#pod =attr site |
|
23
|
|
|
|
|
|
|
#pod |
|
24
|
|
|
|
|
|
|
#pod The site this deploy is deploying for. This will be set before the site calls |
|
25
|
|
|
|
|
|
|
#pod L<the deploy method|/deploy>. |
|
26
|
|
|
|
|
|
|
#pod |
|
27
|
|
|
|
|
|
|
#pod =cut |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has site => ( |
|
30
|
|
|
|
|
|
|
is => 'rw', |
|
31
|
|
|
|
|
|
|
isa => InstanceOf['Statocles::Site'], |
|
32
|
|
|
|
|
|
|
); |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
#pod =method deploy |
|
35
|
|
|
|
|
|
|
#pod |
|
36
|
|
|
|
|
|
|
#pod my @paths = $deploy->deploy( $from_store, $message ); |
|
37
|
|
|
|
|
|
|
#pod |
|
38
|
|
|
|
|
|
|
#pod Deploy the site, copying from the given L<store object|Statocles::Store>, optionally |
|
39
|
|
|
|
|
|
|
#pod committing with the given message. Returns a list of file paths deployed. |
|
40
|
|
|
|
|
|
|
#pod |
|
41
|
|
|
|
|
|
|
#pod This must be implemented by the composing class. |
|
42
|
|
|
|
|
|
|
#pod |
|
43
|
|
|
|
|
|
|
#pod =cut |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
requires qw( deploy ); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=pod |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=encoding UTF-8 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Statocles::Deploy - Base role for ways to deploy a site |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
version 0.085 |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
A Statocles::Deploy deploys a site to a destination, like Git, SFTP, or |
|
66
|
|
|
|
|
|
|
otherwise. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 base_url |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
The base URL for this deploy. Site URLs will be automatically rewritten to be |
|
73
|
|
|
|
|
|
|
based on this URL. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This allows you to have different versions of the site deployed to different |
|
76
|
|
|
|
|
|
|
URLs. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 site |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The site this deploy is deploying for. This will be set before the site calls |
|
81
|
|
|
|
|
|
|
L<the deploy method|/deploy>. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 METHODS |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 deploy |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
my @paths = $deploy->deploy( $from_store, $message ); |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Deploy the site, copying from the given L<store object|Statocles::Store>, optionally |
|
90
|
|
|
|
|
|
|
committing with the given message. Returns a list of file paths deployed. |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This must be implemented by the composing class. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item L<Statocles::Deploy::File> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item L<Statocles::Deploy::Git> |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=back |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 AUTHOR |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Doug Bell <preaction@cpan.org> |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Doug Bell. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
113
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |