envinfo/envinfo.pl
changeset 276 ad9846216af2
parent 275 f914b0494f03
child 277 e7df00ade863
equal deleted inserted replaced
275:f914b0494f03 276:ad9846216af2
    49 	# understand where we should get the info from
    49 	# understand where we should get the info from
    50 	$target = $baseline if (-f $baseline);
    50 	$target = $baseline if (-f $baseline);
    51 	$target = "$baseline\\envinfo.txt" if (!$target && -f "$baseline\\envinfo.txt");
    51 	$target = "$baseline\\envinfo.txt" if (!$target && -f "$baseline\\envinfo.txt");
    52 	$target = "$baseline\\build_info\\logs\\envinfo.txt" if (!$target && -f "$baseline\\build_info\\logs\\envinfo.txt");
    52 	$target = "$baseline\\build_info\\logs\\envinfo.txt" if (!$target && -f "$baseline\\build_info\\logs\\envinfo.txt");
    53 	$target = "$baseline\\build_BOM.zip" if (!$target && -f "$baseline\\build_BOM.zip");
    53 	$target = "$baseline\\build_BOM.zip" if (!$target && -f "$baseline\\build_BOM.zip");
       
    54 	$target = "$baseline\\output\\logs\\envinfo.txt" if (!$target && -f "$baseline\\output\\logs\\envinfo.txt");
       
    55 	$target = "$baseline\\output\\zips\\release\\build_BOM.zip" if (!$target && -f "$baseline\\output\\zips\\release\\build_BOM.zip");
    54 	if (!$target)
    56 	if (!$target)
    55 	{
    57 	{
    56 		warn "WARNING: Can't find envinfo.txt from location '$baseline'\n";
    58 		warn "WARNING: Can't find envinfo.txt from location '$baseline'\n";
    57 	}
    59 	}
    58 	elsif ($target =~ /\.zip$/)
    60 	elsif ($target =~ /\.zip$/)
    59 	{
    61 	{
    60 		print "Extracting envinfo.txt from $target\n";
    62 		print "Extracting envinfo.txt from $target\n";
    61 		my $cmd = "7z e -y $target build_info\logs\envinfo.txt";
    63 		my $cmd = "7z e -y $target build_info\\logs\\BOM\\envinfo.txt";
    62 		my $output = `$cmd 2>&1`;
    64 		my $output = `$cmd 2>&1`;
    63 		if ($output =~ /is not recognized as an internal or external command/)
    65 		if ($output =~ /is not recognized as an internal or external command/)
    64 		{
    66 		{
    65 			$target = '';
    67 			$target = '';
    66 			warn "WARNING: You need to have 7z in the PATH if you want to do comparison against a compressed baseline\n";
    68 			warn "WARNING: You need to have 7z in the PATH if you want to do comparison against a compressed baseline\n";