Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- find sub {
- my $xml_channel = $File::Find::name;
- if($xml_channel !~ /\.svn/ && $xml_channel =~ /branches|tags/ && $xml_channel =~ /\.xml$/ && $xml_channel !~ /codetemplates\.xml/) {
- $xml_channel =~ /\/.*?\/.*?\/.*?\/(.*?\/.*?\/.*?)\/(.*?)\/(.*?)\//;
- my $release = $1;
- my $client = $2;
- my $env = $3;
- if(-e "$repo_folder/$tag_folder/hooks/$client") {
- #die "$xml_channel loaded file $repo_folder/$tag_folder/hooks/$client";
- my $hash = do "$repo_folder/$tag_folder/hooks/$client";
- for my $key(keys %{$hash->{$env}}) {
- if(ref($hash->{$env}->{$key}) ne "CODE") {
- print "File: $xml_channel ($env on $release) ran replace ($key => $hash->{$env}->{$key})\n";
- my $content = read_file "$xml_channel";
- $content =~ s/$key/$hash->{$env}->{$key}/s;
- write_file $xml_channel, $content;
- }
- }
- }
- }
- },"$repo_folder/branches";
Add Comment
Please, Sign In to add comment