Changeset 5137

Show
Ignore:
Timestamp:
12/14/07 16:14:38 (7 months ago)
Author:
morris
Message:

Build releases from branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • build/trunk/scripts/build.pl

    r4566 r5137  
    4444 
    4545sub main { 
    46         my($style, $project) = @_; 
     46        my($style, $project, $version) = @_; 
    4747         
    4848        my $c = Config::INI::Simple->new(); 
     
    5050        my $config = $c->{"default"}; 
    5151         
     52        $version ||= "trunk"; 
     53         
    5254        foreach (keys %{$c->{$style}}) { 
    5355                $config->{$_} = $c->{$style}->{$_}; 
     
    5557         
    5658        if($project) { 
    57                 build($style, $project, $config); 
     59                build($style, $project, $config, $version); 
    5860        } 
    5961        elsif($config->{"projects"}) { 
     
    6971 
    7072sub build { 
    71         my($style, $project, $config) = @_; 
     73        my($style, $project, $config, $version) = @_; 
    7274 
    7375        my($host, $os, $arch) = hostinfo(); 
     
    8284         
    8385        mkdir($work_path); 
     86         
     87        if($version ne "trunk") { 
     88                $config->{"svn_branch"} = "tags/$project-$version"; 
     89        } 
    8490         
    8591        my $variables; 
     
    137143         
    138144        print REPORT "Project:       $project\n"; 
     145        print REPORT "Version:       $version\n"; 
    139146        print REPORT "Build Time:    " . interval($time) . "\n\n"; 
    140147 
     
    185192                } 
    186193                 
    187                $subject .= " of $project " . ($success ? "succeeded" : "failed") . " on $host/$os/$arch"; 
     194           $subject .= " of $project " . ($version ne "trunk" ? $version : "") . " " . ($success ? "succeeded" : "failed") . " on $host/$os/$arch"; 
    188195                 
    189196                if($warnings > 0 || $errors > 0 || $failedtests > 0) { 
     
    275282 
    276283 
    277 main($ARGV[0], $ARGV[1]); 
     284main($ARGV[0], $ARGV[1], $ARGV[2]);