build_package.pl
changeset 38 6da50515cbeb
parent 37 2e0ebeeeaf52
child 39 d6975a94a893
equal deleted inserted replaced
37:2e0ebeeeaf52 38:6da50515cbeb
    24 my $nLOCK_FILE_MAX_ATTEMPTS = 5;
    24 my $nLOCK_FILE_MAX_ATTEMPTS = 5;
    25 my $sNUMBERS_FILE="\\\\bishare\\SF_builds\\numbers2.txt";
    25 my $sNUMBERS_FILE="\\\\bishare\\SF_builds\\numbers2.txt";
    26 my $sLETTERS_FILE="letters.txt";
    26 my $sLETTERS_FILE="letters.txt";
    27 my $nMAX_LETTER_AGE_SECONDS = 86400; # max number of seconds after which the letter is forcibly released
    27 my $nMAX_LETTER_AGE_SECONDS = 86400; # max number of seconds after which the letter is forcibly released
    28 
    28 
    29 my $sFbfProjectRepo = "\\\\bishare\\mercurial_internal\\fbf\\projects\\packages";
    29 my $sFbfProjectRepo = "\\\\bishare\\mercurial_development\\oss\\FCL\\interim\\fbf\\projects\\packages";
    30 my $sFbfProjectDir = '';
    30 my $sFbfProjectDir = '';
    31 my $sSubProject = '';
    31 my $sSubProject = '';
    32 #my $sSourcesFile = '';
    32 #my $sSourcesFile = '';
    33 #my $sModelFile = '';
    33 #my $sModelFile = '';
    34 my $sFbfConfigRepo="\\\\bishare\\mercurial_internal\\fbf\\configs\\pkgbuild";
    34 my $sFbfConfigRepo="\\\\bishare\\mercurial_development\\oss\\FCL\\interim\\fbf\\configs\\pkgbuild";
    35 my $sFbfConfigDir = '';
    35 my $sFbfConfigDir = '';
    36 my $nCmdLineNumber;
    36 my $nCmdLineNumber;
    37 my $bProduction = 0;
    37 my $bProduction = 0;
    38 my $sDiamondsTag = '';
    38 my $sDiamondsTag = '';
    39 my $bHudson = 0;
    39 my $bHudson = 0;
    51 	'tag=s' => \$sDiamondsTag,
    51 	'tag=s' => \$sDiamondsTag,
    52 	'hudson!' => \$bHudson,
    52 	'hudson!' => \$bHudson,
    53 	'publish!' => \$bPublish
    53 	'publish!' => \$bPublish
    54 ));
    54 ));
    55 
    55 
    56 if (!$sSubProject)
    56 if (!($sSubProject or $sFbfProjectRepo or $sFbfProjectDir))
    57 {
    57 {
    58 	print "Usage: build_package.pl --subproj=RELPATH [OPTIONS]\n";
    58 	print "Usage: build_package.pl --subproj=RELPATH [OPTIONS]\n";
       
    59 	print "       build_package.pl --projectrepo=REPO [OPTIONS]\n";
    59 	print "where OPTIONS are:\n";
    60 	print "where OPTIONS are:\n";
    60 	print "\t--subproj=RELPATH Select subproject located at RELPATH (relative to the root of the project repository)\n";
    61 	print "\t--subproj=RELPATH Select subproject located at RELPATH (relative to the root of the project repository)\n";
    61 	print "\t--projectrepo=REPO[#REV] Use repository REPO at revision REV for the project (instead of \\\\bishare\\mercurial_internal\\fbf\\projects\\packages)\n";
    62 	print "\t--projectrepo=REPO[#REV] Use repository REPO at revision REV for the project (instead of \\\\bishare\\mercurial_internal\\fbf\\projects\\packages)\n";
    62 	print "\t--projectdir=DIR Use DIR location for the project (exclusive with --projectrepo).\n";
    63 	print "\t--projectdir=DIR Use DIR location for the project (exclusive with --projectrepo).\n";
    63 	#print "\t--sources=FILE ...\n";
    64 	#print "\t--sources=FILE ...\n";
    70 	print "\t--hudson Checks that there is at least NUMBER_OF_PROCESSORS X 10 GB available on the working drive\n";
    71 	print "\t--hudson Checks that there is at least NUMBER_OF_PROCESSORS X 10 GB available on the working drive\n";
    71 	print "\t--nopublish Use numbers_test.txt for numbers and disable publishing\n";
    72 	print "\t--nopublish Use numbers_test.txt for numbers and disable publishing\n";
    72 	exit(0);
    73 	exit(0);
    73 }
    74 }
    74 
    75 
    75 if ($sSubProject !~ m,^([^/]+)/[^/]+/([^/]+)$,)
    76 if ($sSubProject and $sSubProject !~ m,^([^/]+)/[^/]+/([^/]+)$,)
    76 {
    77 {
    77 	print "ERROR: Option --subproj must be in the format codeline/layer/package (e.g. MCL/os/boardsupport)\n";
    78 	print "ERROR: Option --subproj must be in the format codeline/layer/package (e.g. MCL/os/boardsupport)\n";
    78 	exit(0);
    79 	exit(0);
    79 }
    80 }
    80 
    81