##// END OF EJS Templates
build.pl: remove prefix from from job name
Jani Honkonen -
r1133:d7b22fbc15ae
parent child
Show More
@@ -1,48 +1,55
1 1 use lib 'test/scripts'; # for IniFiles
2 2 use File::Basename;
3 3 use IniFiles;
4 4 use feature "switch";
5 5
6 6 # read command line params
7 7 my $jobname = shift;
8 8
9 # Strip the prefix from job name when using ${bamboo.buildPlanName}
10 my $prefix = "Digia Qt Commercial - Chart component - ";
11 $jobname =~ s/$prefix//;
12
9 13 # read ini file
10 14 my $scriptdir = File::Basename::dirname($0);
11 15 my $inifile = $scriptdir . "/jobs.ini";
12 16 my %cfg;
13 17 tie %cfg, 'Config::IniFiles', ( -file => $inifile );
14 18
15 19 # get section from ini by jobname
16 20 my %build = %{$cfg{$jobname}};
21 if (!%build) {
22 die ("Unknown jobname! Check $inifile and bamboo job name.");
23 }
17 24
18 25 # print out the ini settings
19 26 print "\n\n$jobname\n";
20 27 print "**********\n";
21 28 foreach (keys %build) {
22 29 print $_ . " : " . $build{$_} . "\n";
23 30 }
24 31
25 32 # examine the platform
26 33 given ($build{'Platform'}) {
27 34 when ("Win7") {
28 35 # construct a build command
29 36 my @cmd;
30 37 if ($build{'ToolChain'} eq "mingw") {
31 38 @cmd = ($scriptdir . "\\build_win_mingw.bat", $build{'QtDir'}, $build{'Config'}, $build{'MinGWDir'});
32 39 }
33 40 if ($build{'ToolChain'} eq "vs2005") {
34 41 @cmd = ($scriptdir . "\\build_win_vs2005.bat", $build{'QtDir'}, $build{'Config'});
35 42 }
36 43 if ($build{'ToolChain'} eq "vs2008") {
37 44 @cmd = ($scriptdir . "\\build_win_vs2008.bat", $build{'QtDir'}, $build{'Config'});
38 45 }
39 46 if ($build{'ToolChain'} eq "vs2010") {
40 47 @cmd = ($scriptdir . "\\build_win_vs2010.bat", $build{'QtDir'}, $build{'Config'});
41 48 }
42 49 # run the build command
43 50 system (@cmd) == 0 or die "system @cmd failed: $?";
44 51 }
45 52 default {
46 53 die "Unknown platform " . $build{'Platform'};
47 54 }
48 55 } No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now