/[adm]/puppet/modules/subversion/manifests/hook.pp
ViewVC logotype

Diff of /puppet/modules/subversion/manifests/hook.pp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2640 by misc, Sun Jan 15 17:05:53 2012 UTC revision 2641 by misc, Mon Mar 19 19:51:44 2012 UTC
# Line 1  Line 1 
1  class subversion {  define subversion::hook($content, $type) {
2      class hook {      $array = split($name,'\|')
3          define post_commit($content) {      $repo = $array[0]
4              commit_hook { $name:      $script = $array[1]
5                  content => $content,      file { "$repo/hooks/$type.d/$script":
6                  type => "post-commit",          content => $content,
7              }          mode    => '0755',
         }  
         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/hooks/$type.d/$script":  
                 content => $content,  
                 mode => 755,  
             }  
         }  
8      }      }
9  }  }

Legend:
Removed from v.2640  
changed lines
  Added in v.2641

  ViewVC Help
Powered by ViewVC 1.1.30