blob: e73688bb2d808f42899c4129331403ee59a54011 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class subversion {
class hook {
define post_commit($content) {
commit_hook { $name:
content => $content,
type => "post-commit",
}
}
define pre_commit($content) {
commit_hook { $name:
content => $content,
type => "pre-commit",
}
}
define commit_hook($content, $type) {
$array = split($name,'\|')
$repos = shift($array)
$script = shift($array)
file { "$repo/hook/$type.d/$script":
content => $content,
mode => 755,
}
}
}
}
|