root/library/perl/trunk/Archer/lib/Archer/Plugin/SVN/Update.pm

Revision 361, 0.8 kB (checked in by miya, 2 years ago)

Rsync: Change config format in yaml.
SVN::*: change variable name of SVN::Agent object.

Archer::Plugin: Fix to set dest_dir in templatize.

Line 
1 package Archer::Plugin::SVN::Update;
2
3 use strict;
4 use warnings;
5 use base qw( Archer::Plugin::SVN );
6
7 use SVN::Agent;
8
9 sub run {
10     my ($self, $context, $args) = @_;
11
12     my $path = $self->{config}->{path}
13         || File::Spec->catfile($context->{config}->{global}->{work_dir}, $context->{project});
14     $path = $self->templatize($path);
15
16     my $svn = SVN::Agent->load({ path => $path });
17     $svn->update;
18 }
19
20 1;
21
22 __END__
23
24 =head1 NAME
25
26 Archer::Plugin::SVN::Update - svn update
27
28 =head1 SYNOPSIS
29
30   - module: SVN::Update
31     config:
32       path: "[% work_dir %]/[% project %]"
33
34 =head1 DESCRIPTION
35
36 Execute svn update.
37
38 =head1 CONFIG
39
40 =head2 path
41
42 Svn working directory path.Default is [% work_dir %]/[% project %].
43
44 =head1 AUTHORS
45
46 Gosuke Miyashita
47
48 =head1 SEE ALSO
49
50 L<SVN::Agent>
51
52 =cut
53
Note: See TracBrowser for help on using the browser.