Changeset 1117


Ignore:
Timestamp:
11/26/10 12:54:45 (2 years ago)
Author:
bruno
Message:

r4058@localhost: bruno | 2010-11-26 11:42:34 +0100

  • New Web site management with 4 targtes instead of only 2 (sbx2webssh, ...)
Location:
devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf.pod

    r1115 r1117  
    580580 Example: webdir mondorescue = website 
    581581 
    582 =item B<pb URL> 
    583 =item B<pb directory desc> 
    584 =item B<pb environment variables> 
    585  
    586582=back 
     583 
     584=head1 OTHER PARAMETERS 
     585=item B<pb_URL> 
     586=item B<pb_directory_desc> 
     587=item B<pb_environment_variables> 
  • devel/pb/bin/pb

    r1112 r1117  
    292292Announce the availability of the project through various means 
    293293 
    294 =item B<web2ssh> 
    295  
    296 Deliver the Web site content to the target server using ssh. 
     294=item B<sbx2webssh> 
     295 
     296Create tar files for the website under your CMS.  
     297Current state of the exported content is taken. 
     298Deliver the content to the target server using ssh from the exported dir. 
     299 
     300=item B<cms2webssh> 
     301 
     302Create tar files for the website from your CMS.  
     303Deliver the content to the target server using ssh from the DVCS. 
     304 
     305=item B<sbx2webpkg> 
     306 
     307Create tar files for the website under your CMS.  
     308Current state of the exported content is taken. 
     309 
     310=item B<cms2webpkg> 
     311 
     312Create tar files for the website under your CMS.  
    297313 
    298314=item B<clean> 
     
    563579 
    564580    pb_announce(); 
    565 } elsif ($action =~ /^web2ssh$/) { 
     581} elsif ($action =~ /^sbx2webpkg$/) { 
    566582    require DBI; 
    567583    require DBD::SQLite; 
    568584 
    569     pb_cms2build("Web"); 
     585    pb_cms2build("SandBox","Web"); 
     586} elsif ($action =~ /^sbx2webssh$/) { 
     587    require DBI; 
     588    require DBD::SQLite; 
     589 
     590    pb_cms2build("SandBox","Web"); 
     591    pb_send2target("Web"); 
     592} elsif ($action =~ /^cms2webpkg$/) { 
     593    require DBI; 
     594    require DBD::SQLite; 
     595 
     596    pb_cms2build("CMS","Web"); 
     597} elsif ($action =~ /^cms2webssh$/) { 
     598    require DBI; 
     599    require DBD::SQLite; 
     600 
     601    pb_cms2build("CMS","Web"); 
    570602    pb_send2target("Web"); 
    571603} else { 
     
    577609 
    578610    my $param = shift || undef; 
     611    my $web = shift || undef; 
    579612 
    580613    my $pkg; 
     
    585618    my %pb;             # Structure to store conf info 
    586619 
    587     die "pb_cms2build requires a parameter: Web, SandBox or CMS" if (not defined $param); 
     620    die "pb_cms2build requires a parameter: SandBox or CMS" if (not defined $param); 
    588621 
    589622    # If Website, then pkg is only the website 
    590     if ($param eq "Web") { 
     623    if (defined $web) { 
    591624        ($webdir) = pb_conf_get("webdir"); 
    592625        pb_log(2,"webdir: ".Dumper($webdir)."\n"); 
     
    645678        my $dir = $defpkgdir->{$pbpkg}; 
    646679        $dir = $extpkgdir->{$pbpkg} if (not defined $dir); 
    647         $dir = $webdir->{$ENV{'PBPROJ'}} if ($param eq "Web"); 
     680        $dir = $webdir->{$ENV{'PBPROJ'}} if (defined $web); 
     681        die "Variable \$dir not defined. Please report to dev team with log of a verbose run and this info ".Dumper($webdir) if (not defined $dir); 
    648682        pb_log(2,"def:".Dumper($defpkgdir)." ext: ".Dumper($extpkgdir)." \n"); 
    649683 
     
    703737        $pb{'ver'} = $pbver; 
    704738        $pb{'pkg'} = $pbpkg; 
     739        $pb{'realpkg'} = $pbpkg; 
    705740        $pb{'date'} = $pbdate; 
    706741        $pb{'defpkgdir'} = $defpkgdir; 
     
    714749     
    715750        # Do not do that for website 
    716         if ($param ne "Web") { 
     751        if (not defined $web) { 
    717752            pb_log(0,"Build files are being generated for ...\n"); 
    718753            my %virt; 
     
    837872 
    838873        # Do not do that for website 
    839         if ($param ne "Web") { 
     874        if (not defined $web) { 
    840875            my %tmp; 
    841876            my $warnflag = 0; 
Note: See TracChangeset for help on using the changeset viewer.