Ignore:
Timestamp:
09/19/13 21:07:36 (7 years ago)
Author:
ak19
Message:

The changes needed to have the nightly snapshot task uploading successfully to the caveat from the Mountain Lion mac

Location:
other-projects/nightly-tasks/snapshot/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/snapshot/trunk/lib.pl

    r27661 r28299  
    115115            #upload
    116116            print "Will upload '" . basename($file) . "' to '$filename'\n";
    117             system("copy \"$file\" \"${release_dir}${sep}uploads${sep}$filename\"");
     117            if( $^O =~ "linux|darwin" ) {
     118                system("cp \"$file\" \"${release_dir}${sep}uploads${sep}$filename\"");
     119            }
     120            else {
     121                system("copy \"$file\" \"${release_dir}${sep}uploads${sep}$filename\"");
     122            }
    118123        }
    119124
  • other-projects/nightly-tasks/snapshot/trunk/task.pl

    r27676 r28299  
    1616our $branch_path = "";
    1717our $major_version = 0;
     18
     19# for Darwin, specify if this binary is for (Mountain)Lions in the filename, otherwise it's for Leopards
     20# http://en.wikipedia.org/wiki/Darwin_(operating_system)
     21# darwin11* Lion, darwin12* Mountain Lion, darwin9* and darwin10* are Leopard and Snow Leopard
     22my $osversion = "";
     23if($^O eq "darwin") {
     24    #$osversion=`uname -r | sed 's/\..*$//'`;
     25    $osversion=`uname -r`; #$osversion =~ s@\..*$@@;
     26    $osversion = ($osversion =~ m@^1[1-9]@i) ? "-Lion" : "";
     27}
    1828
    1929# if the first arg is a digit, it's the new envi verbosity param. Take it off the array
     
    8393    #change the filenames to have the date in them
    8494    my $id2 = $ENV{'snapshot_id2'};
    85     (my $id2re = $id2) =~ s@\.@\\.@g; #copy id2 and then change idre, see http://www.perlmonks.org/?node_id=366431
     95    (my $id2re = $id2) =~ s@\.@\\.@g; #copy id2 and then change id2re, see http://www.perlmonks.org/?node_id=366431
    8696
    8797    my $id3 = $ENV{'snapshot_id3'};
    8898    (my $id3re = $id3) =~ s@\.@\\.@g;
    8999
    90     $ENV{'munges'} = "s/-$id2re/-$id2-candidate-" . get_date() . "/g " if ($id2 =~ m/\S/);
    91     $ENV{'munges'} .= "s/-$id3re/-$id3-candidate-" . get_date() . "/g" if ($id3 =~ m/\S/);
     100    $ENV{'munges'} = "s/-$id2re/-$id2$osversion-candidate-" . get_date() . "/g " if ($id2 =~ m/\S/);
     101    $ENV{'munges'} .= "s/-$id3re/-$id3$osversion-candidate-" . get_date() . "/g" if ($id3 =~ m/\S/);
    92102
    93103    # the above generates a list of regex. Have a \D (non-digit) prefixed to the value to be substituted, else
     
    138148
    139149#always rename the log not to clash with other files on puka
    140 $ENV{'munges'} = $ENV{'munges'} . " s/\\.out\$/-" . get_date() . "-" . $^O . "-log.txt/";
     150$ENV{'munges'} = $ENV{'munges'} . " s/\\.out\$/-" . get_date() . "-" . $^O . $osversion . "-log.txt/";
    141151
    142152#choose a snapshot ID
Note: See TracChangeset for help on using the changeset viewer.