aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-15 16:24:50 +0000
committerMichael Scherer <misc@mageia.org>2012-01-15 16:24:50 +0000
commit25ad808e7ef9b0d1d1709d7976a247fc92a3138d (patch)
treeab09261f242c41f161ddf0007f8f92b8d968d2eb
parent41676fe065b98a523e22d335137c130349dfb52a (diff)
downloadpuppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar
puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.gz
puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.bz2
puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.xz
puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.zip
add a subversion::hook class, to let us specify custom hook
-rw-r--r--modules/subversion/manifests/hook.pp26
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,
+ }
+ }
+ }
+}