diff options
author | Michael Scherer <misc@mageia.org> | 2010-11-19 00:24:22 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-11-19 00:24:22 +0000 |
commit | 090867e1a559885b11c914c977cfd2843c5ee746 (patch) | |
tree | bc9b9c58cc712acb3e54acb6ab2b1753d143705c | |
parent | f7254c82c2526397fd02e8df01508e9c8541a285 (diff) | |
download | puppet-090867e1a559885b11c914c977cfd2843c5ee746.tar puppet-090867e1a559885b11c914c977cfd2843c5ee746.tar.gz puppet-090867e1a559885b11c914c977cfd2843c5ee746.tar.bz2 puppet-090867e1a559885b11c914c977cfd2843c5ee746.tar.xz puppet-090867e1a559885b11c914c977cfd2843c5ee746.zip |
- add logic to extract directory from svn on commit
-rw-r--r-- | modules/subversion/manifests/init.pp | 12 | ||||
-rw-r--r-- | modules/subversion/templates/hook_extract.pl | 10 |
2 files changed, 21 insertions, 1 deletions
diff --git a/modules/subversion/manifests/init.pp b/modules/subversion/manifests/init.pp index 3b7542e1..77887a3d 100644 --- a/modules/subversion/manifests/init.pp +++ b/modules/subversion/manifests/init.pp @@ -91,7 +91,17 @@ class subversion { mode => 755, content => template("subversion/hook_sendmail.pl") } - } + } + + if $extract_dir { + file { "$name/hooks/post-commit.d/extract_dir": + ensure => present, + owner => root, + group => root, + mode => 755, + content => template("subversion/hook_extract.pl") + } + } } diff --git a/modules/subversion/templates/hook_extract.pl b/modules/subversion/templates/hook_extract.pl new file mode 100644 index 00000000..7f4f0a29 --- /dev/null +++ b/modules/subversion/templates/hook_extract.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl -MSVN::Notify::Config=$0 +--- #YAML:1.0 +<% extract_dir.each do |src,dest| %> + +'<%= src %>': + PATH: "/usr/bin:/usr/local/bin" + handler: Mirror + svn-binary: /usr/bin/svn + to: <%= dest %> +<% end %> |