- Timestamp:
- Oct 25, 2010, 12:26:55 AM (14 years ago)
- Location:
- devel/pb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified devel/pb/bin/pb ¶
r1096 r1097 142 142 =over 4 143 143 144 =item B< cms2build>144 =item B<sbx2build> 145 145 146 146 Create tar files for the project under your CMS. 147 CMS supported are SVN, CVS and Mercurial 147 Current state of the exported content is taken. 148 CMS supported are SVN, SVK, CVS, Git and Mercurial 148 149 parameters are packages to build 149 150 if not using default list 150 151 152 =item B<cms2build> 153 154 Create tar files for the project under your CMS. 155 Current state of the CMS is taken. 156 CMS supported are SVN, SVK, CVS, Git and Mercurial 157 parameters are packages to build 158 if not using default list 159 151 160 =item B<build2pkg> 152 161 … … 157 166 cms2build + build2pkg 158 167 168 =item B<sbx2pkg> 169 170 sbx2build + build2pkg 171 159 172 =item B<build2ssh> 160 173 161 174 Send the tar files to a SSH host 175 176 =item B<sbx2ssh> 177 178 sbx2build + build2ssh 162 179 163 180 =item B<cms2ssh> … … 179 196 Create packages in VEs, creating it if needed 180 197 and send those packages to a SSH host once built 198 199 =item B<sbx2vm> 200 201 sbx2build + build2vm 202 203 =item B<sbx2ve> 204 205 sbx2build + build2ve 181 206 182 207 =item B<cms2vm> … … 441 466 # Act depending on action 442 467 if ($action =~ /^cms2build$/) { 443 pb_cms2build(); 468 pb_cms2build("CMS"); 469 } elsif ($action =~ /^sbx2build$/) { 470 pb_cms2build("SandBox"); 444 471 } elsif ($action =~ /^build2pkg$/) { 445 472 pb_build2pkg(); 446 473 } elsif ($action =~ /^cms2pkg$/) { 447 pb_cms2build(); 474 pb_cms2build("CMS"); 475 pb_build2pkg(); 476 } elsif ($action =~ /^sbx2pkg$/) { 477 pb_cms2build("SandBox"); 448 478 pb_build2pkg(); 449 479 } elsif ($action =~ /^build2ssh$/) { 450 480 pb_build2ssh(); 451 481 } elsif ($action =~ /^cms2ssh$/) { 452 pb_cms2build(); 482 pb_cms2build("CMS"); 483 pb_build2ssh(); 484 } elsif ($action =~ /^sbxs2ssh$/) { 485 pb_cms2build("SandBox"); 453 486 pb_build2ssh(); 454 487 } elsif ($action =~ /^pkg2ssh$/) { … … 459 492 pb_build2v("vm","build"); 460 493 } elsif ($action =~ /^cms2ve$/) { 461 pb_cms2build(); 494 pb_cms2build("CMS"); 495 pb_build2v("ve","build"); 496 } elsif ($action =~ /^sbx2ve$/) { 497 pb_cms2build("SandBox"); 462 498 pb_build2v("ve","build"); 463 499 } elsif ($action =~ /^cms2vm$/) { 464 pb_cms2build(); 500 pb_cms2build("CMS"); 501 pb_build2v("vm","build"); 502 } elsif ($action =~ /^sbx2vm$/) { 503 pb_cms2build("SandBox"); 465 504 pb_build2v("vm","build"); 466 505 } elsif ($action =~ /^launchvm$/) { … … 528 567 my %pb; # Structure to store conf info 529 568 569 die "pb_cms2build requires a parameter: Web, SandBox or CMS" if (not defined $param); 570 530 571 # If Website, then pkg is only the website 531 if ( (defined $param) && ($param eq "Web")) {572 if ($param eq "Web") { 532 573 ($webdir) = pb_conf_get("webdir"); 533 574 pb_log(2,"webdir: ".Dumper($webdir)."\n"); … … 540 581 } 541 582 542 my ($scheme, $uri) = pb_cms_init($pbinit );583 my ($scheme, $uri) = pb_cms_init($pbinit,$param); 543 584 544 585 # We need 2 lines here … … 586 627 my $dir = $defpkgdir->{$pbpkg}; 587 628 $dir = $extpkgdir->{$pbpkg} if (not defined $dir); 588 $dir = $webdir->{$ENV{'PBPROJ'}} if ( (defined $param) && ($param eq "Web"));629 $dir = $webdir->{$ENV{'PBPROJ'}} if ($param eq "Web"); 589 630 pb_log(2,"def:".Dumper($defpkgdir)." ext: ".Dumper($extpkgdir)." \n"); 590 631 591 632 # Exporting content from CMS 592 my $preserve = pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest); 633 my $sourcedir = undef; 634 my $sourceuri = $uri; 635 if ($param eq "SandBox") { 636 # Point to the local instance 637 $sourcedir = "$ENV{'PBDIR'}/$dir"; 638 } else { 639 # Get it from a subdir of the URI with same version as localy but different root 640 $sourceuri = "$ENV{'PBDIR'}/$dir"; 641 $sourceuri =~ s|^$ENV{'PBPROJDIR'}/|$uri|; 642 } 643 my $preserve = pb_cms_export($sourceuri,$sourcedir,$dest); 593 644 594 645 # Generated fake content for test versions to speed up stuff … … 617 668 my %patches; 618 669 619 # Get list of distributions for which Ineed to generate build files670 # Get list of distributions for which we need to generate build files 620 671 if (defined $pt[0]->{$ENV{'PBPROJ'}}) { 621 672 $tmpl .= $pt[0]->{$ENV{'PBPROJ'}}; 622 673 } 623 674 if (defined $pt[1]->{$ENV{'PBPROJ'}}) { 624 # the 2 lists needs to be grouped with a ',' separating them675 # The 2 lists needs to be grouped with a ',' separating them 625 676 if ($tmpl ne "") { 626 677 $tmpl .= ","; … … 645 696 646 697 # Do not do that for website 647 if ( (not defined $param) || ($param ne "Web")) {698 if ($param ne "Web") { 648 699 pb_log(0,"Build files are being generated for ...\n"); 649 700 my %virt; … … 768 819 769 820 # Do not do that for website 770 if ( (not defined $param) || ($param ne "Web")) {821 if ($param ne "Web") { 771 822 my %tmp; 823 my $warnflag = 0; 772 824 # Filter potential patches (local + remote) 773 825 pb_log(0,"Delivering and compressing patches "); … … 776 828 foreach my $pf (split(/,/,$patches{$v})) { 777 829 my $pp = basename($pf); 830 if ($param eq "SandBox") { 831 $warnflag = 1; 832 } 778 833 pb_cms_export($pf,undef,"$dest/pbconf/$v/pbpatch"); 779 834 pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbpatch/$pp",\%pb); … … 786 841 } 787 842 pb_log(0,"\n"); 843 pb_log(0,"WARNING: Patches are always taken from repository not local export\n") if ($warnflag == 1); 788 844 } else { 789 845 # Instead call News generation -
TabularUnified devel/pb/lib/ProjectBuilder/CMS.pm ¶
r940 r1097 57 57 58 58 my $pbinit = shift || undef; 59 my $param = shift || undef; 59 60 60 61 my ($pburl) = pb_conf_get("pburl"); … … 70 71 $ENV{'PBPROJDIR'} = "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}"; 71 72 } 73 # Expand potential env variable in it to allow string replacement 74 eval { $ENV{'PBPROJDIR'} =~ s/(\$ENV.+\})/$1/eeg }; 75 72 76 73 77 # Computing the default dir for PBDIR. … … 101 105 $ENV{'PBCMSLOGFILE'}="flat.log"; 102 106 } elsif ($scheme =~ /^svn/) { 103 # svnversion more precise than svn info 104 $tmp = `(cd "$ENV{'PBDIR'}" ; $vcscmd"version" .)`; 107 # svnversion more precise than svn info if sbx 108 if ($param eq "CMS") { 109 $tmp = `(LANGUAGE=C $vcscmd info $pburl->{$ENV{'PBPROJ'}} | grep -E '^Revision:' | cut -d: -f2)`; 110 $tmp =~ s/\s+//; 111 } else { 112 $tmp = `(cd "$ENV{'PBDIR'}" ; $vcscmd"version" .)`; 113 } 105 114 chomp($tmp); 106 115 $ENV{'PBREVISION'}=$tmp; 107 116 $ENV{'PBCMSLOGFILE'}="svn.log"; 108 117 } elsif ($scheme =~ /^svk/) { 109 $tmp = `(cd "$ENV{'PBDIR'}" ; $vcscmd info . | grep -E '^Revision:' | cut -d: -f2)`;118 $tmp = `(cd "$ENV{'PBDIR'}" ; LANGUAGE=C $vcscmd info . | grep -E '^Revision:' | cut -d: -f2)`; 110 119 $tmp =~ s/\s+//; 111 120 chomp($tmp); … … 267 276 } else { 268 277 # Probably not right, should be checked, but that way I'll notice it :-) 278 pb_log(0,"You're in an untested part of project-builder.org, please report any result upstream\n"); 269 279 $tmp1 = $uri; 270 280 } -
TabularUnified devel/pb/lib/ProjectBuilder/Env.pm ¶
r1094 r1097 286 286 return if ($action =~ /^clean$/); 287 287 288 if (($action =~ /^cms2/) || ($action =~ /^ newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^web/)) {288 if (($action =~ /^cms2/) || ($action =~ /^sbx2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^web/)) { 289 289 290 290 #
Note:
See TracChangeset
for help on using the changeset viewer.