| 1 | package Statocles::Deploy; | ||
| 2 | 52 | our $VERSION = '0.099'; | |
| 3 | # ABSTRACT: Base role for ways to deploy a site | ||
| 4 | |||
| 5 | 52 | ▶ | use Statocles::Base 'Role'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 52 | 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 | 52 | 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 | 52 | requires qw( deploy ); | |
| 46 | |||
| 47 | 52 | 1; | |
| 48 | |||
| 49 | __END__ | ||