blob: fff04cd29c6a3d468ec91880068d796e47057a2b (
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,'\|')
$repo = $array[0]
$script = $array[1]
file { "$repo/hook/$type.d/$script":
content => $content,
mode => 755,
}
}
}
}
|