diff options
Diffstat (limited to 'modules/subversion')
-rw-r--r-- | modules/subversion/manifests/hook.pp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/subversion/manifests/hook.pp b/modules/subversion/manifests/hook.pp new file mode 100644 index 00000000..c17b4a4c --- /dev/null +++ b/modules/subversion/manifests/hook.pp @@ -0,0 +1,26 @@ +class subversion { + class hook { + define post_commit($content) { + commit_hook { $name: + content => $content, + type => "postcommit", + } + } + define post_commit($content) { + commit_hook { $name: + content => $content, + type => "postcommit", + } + } + + define commit_hook($content, $type) { + $array = split($name,'\|') + $repos = shift($array) + $script = shift($array) + file { "$repo/hook/$type.d/$script": + content => $content, + mode => 755, + } + } + } +} |