I've decided that I need to raise the profile of some of my CPAN releases. Being too lazy to maintain my own website, I thought I'd do it here instead.
Today's module is SVN::Notify::Mirror, which allows me to keep multiple working copies, on local and remote machines, automatically synced to changes in the repository. The latest version of the module even supports switching to a new tag, based on a regex.
It acts as a handler for the fairly magical SVN::Notify by David Wheeler, along with the even more magical SVN::Notify::Config by Autrijus Tang.
What these modules let me do is have a very simple to understand post-commit file that looks like this:
#!/usr/bin/perl -MSVN::Notify::Config=$0
--- #YAML:1.0
'':
PATH: "/usr/bin:/usr/local/bin"
'path/in/repository':
handler: Mirror
to: "/path/to/www/htdocs"
'some/other/path/in/repository':
handler: Mirror
to: "/path/to/remote/www/htdocs"
ssh-host: "remote_host"
ssh-user: "remote_user"
ssh-tunnel: "10.0.0.2"
ssh-identity: "/home/user/.ssh/id_rsa"
'some/project/tags':
handler: Mirror
to: "/path/to/another/dir"
tag-regex: "RELEASE-"
For example, the config file above allows me to keep: