diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-17 13:14:12 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-17 13:14:12 -0400 |
commit | 0f8ed472359d59b6b259e4a6ba3e64529c5a3577 (patch) | |
tree | dfc8ebd5e63f1e5cd9d92804e3d36391cd8b91e4 /lib | |
parent | e875ac69b4cc59852412bf09b36f5f272f8acc21 (diff) | |
download | crawlbot-master.tar.gz crawlbot-master.zip |
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Crawl/Bot/Plugin/Commit.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm index 9344dde..652b067 100644 --- a/lib/Crawl/Bot/Plugin/Commit.pm +++ b/lib/Crawl/Bot/Plugin/Commit.pm @@ -10,6 +10,12 @@ has repo_uri => ( default => 'git://gitorious.org/crawl/crawl.git', ); +has mirror_uri => ( + is => 'ro', + isa => 'Str', + default => 'git@github.com:crawl-ref/crawl-ref', +); + has announce_commits => ( is => 'rw', isa => 'Bool', @@ -171,6 +177,11 @@ sub tick { my $dir = pushd($self->checkout); warn "fetch"; system('git fetch'); + + if (my $mirror = $self->mirror_uri) { + system("git push --mirror $mirror"); + } + for my $branch ($self->branches) { my $old_head = $self->head($branch) || ''; warn "rev-parse $branch"; |