Add --bom option to be able to run a package build from sources.csv of a previous build
authordario.sestito@v800052.ad-sfpd.intra
Tue, 13 Apr 2010 18:22:12 +0100
changeset 74 72cc60784b23
parent 73 457adde87bbd
child 75 2a106c5499cb
Add --bom option to be able to run a package build from sources.csv of a previous build
build_package.pl
--- a/build_package.pl	Fri Mar 26 15:06:44 2010 +0000
+++ b/build_package.pl	Tue Apr 13 18:22:12 2010 +0100
@@ -41,6 +41,7 @@
 my $bPublish = 1;
 my %hHlmDefines = ();
 my $bDisableAntiVirus = 0;
+my $sUseBom = '';
 my $bHelp = 0;
 GetOptions((
 	'configrepo=s' => \$sFbfConfigRepo,
@@ -58,6 +59,7 @@
 	'publish!' => \$bPublish,
 	'define=s' => \%hHlmDefines,
 	'disableav!' => \$bDisableAntiVirus,
+	'bom=s' => \$sUseBom,
 	'help!' => \$bHelp
 ));
 
@@ -81,6 +83,7 @@
 	print "\t--nopublish Use \\numbers_test.txt for numbers and disable publishing\n";
 	print "\t--define ATTRIBUTE=VALUE Pass -D statements to the Helium Framework\n";
 	print "\t--disableav Disable Anti-Virus for the duration of the build (also sync with other concurrent package builds)\n";
+	print "\t--bom=LOCATION Use to build by taking the sources.csv from the build_BOM.zip at LOCATION\n";
 	exit(0);
 }
 
@@ -170,6 +173,15 @@
 print("$sBootstrapCmd\n");
 system($sBootstrapCmd);
 
+# get sources.csv from supplied BOM location
+if ($sUseBom)
+{
+  print("get sources.csv from supplied BOM location\n");
+  my $sGetSourcesCmd = "7z e -y -i!build_info\\logs\\BOM\\sources.csv -o$sJobDir\\build\\config\\$sSubProject $sUseBom\\build_BOM.zip";
+  print("$sGetSourcesCmd\n");
+  system($sGetSourcesCmd);
+}
+
 # check that $sNUMBERS_FILE exists, otherwise create it
 if (!-f $sNUMBERS_FILE)
 {