Changeset 1554


Ignore:
Timestamp:
May 21, 2012, 3:19:04 AM (7 years ago)
Author:
bruno
Message:
  • pb: Update documentation, the newproj docs were missing an important argument. Expanded out the newproj documentation. Fixed the cms2build documentation to match the same style as the other documentation. (Eric Anderson)
  • CMS.pm/VCS.pm: Tolerate the file: scheme -- it was tolerated in some places but not others. (Eric Anderson)
Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r1540 r1554  
    328328    $newurl = pb_vcs_mod_htftp($newurl,"svn");
    329329    pb_system("$vcscmd copy -m \"Creation of $newurl from $oldurl\" $oldurl $newurl","Copying $oldurl to $newurl ");
    330 } elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
     330} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     331    # Nothing to do.
    331332} else {
    332333    die "cms $scheme unknown for project management";
     
    406407        pb_system("(cd $d && $vcscmd pull)", "Updating $d ");
    407408    }
    408 } elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
     409} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     410    # Nothing to do.
    409411} else {
    410412    die "cms $scheme unknown";
     
    431433} elsif ($scheme =~ /^git/) {
    432434    pb_system("cd $dir && $vcscmd commit -a -m \"$msg\"", "Checking in $dir ");
    433 } elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
     435} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     436    # Nothing to do.
    434437} else {
    435438    die "cms $scheme unknown";
     
    453456if ($scheme =~ /^((hg)|(git)|(svn)|(svk)|(cvs))/o) {
    454457    pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
    455 } elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))   {
     458} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     459    # Nothing to do.
    456460} else {
    457461    die "cms $scheme unknown";
     
    482486        $l++;
    483487    }
    484 } elsif (($scheme eq "flat") || ($scheme eq "ftp") || ($scheme eq "http"))  {
     488} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
    485489    $l = 0;
    486490} else {
  • devel/pb/bin/pb

    r1553 r1554  
    479479You can then run the command:
    480480
    481  % pb -p I<$project> -r I<$version> newproj
    482 
    483 to create the new project. Running the newproj command will then generate the file $pbdefdir/$project/pbconf/$version/$project.pb.  You will need to edit that file in order to run any of the later commands.
     481 % pb -p I<$project> -r I<$version> newproj I<$pkg>
     482
     483to create the new project. Running the newproj command will then generate the file $pbdefdir/$project/pbconf/$version/$project.pb, and the directory $pbdefdir/$project/pbconf/$version/$pkg. You will need to edit those files to make the later commands work.
    484484
    485485=head2 cms2build
    486486
    487 The cms2build command takes your files from the content management system and makes the two tar files that are necessary for building files. Before running this command, you need to run the newproj command, and edit the $project.pb configuration file. In particular, you need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, deliver, and defpkgdir lines as described in the configuration file. Then you can run a command like:
     487The cms2build command takes your files from the content management system and makes the two tar files that are necessary for building files. You need to have run the newproj command first.  Then there are several steps for running this command:
     488
     489=over 4
     490
     491=item Update your $project.pb configuration file.
     492
     493You need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, delivery, and defpkgdir lines as described in the configuration file.  For example:
     494
     495 pburl Lintel = file:///home/anderse/projects/Lintel-0.2012.02.28.tar.gz
     496 pbrepo Lintel = http://tesla.hpl.hp.com/opensource
     497 pbwf Lintel = 1
     498 pbpackager Lintel = Eric Anderson <eric.anderson4@hp.com>
     499 projver Lintel = 0.2012.02.28
     500 projtag Lintel = 1
     501 testver Lintel = false
     502 delivery Lintel = production
     503 defpkgdir Lintel = Lintel-0.2012.02.28
     504
     505=item Create the build .tar.gz files:
     506
     507Then you need to take those files and create the initial tar files.  Run a command like:
    488508
    489509 % pb -p $project -r $version cms2build
    490510
    491511To create the $pbdefdir/$project/delivery/$project-$version.{,pbconf}.tar.gz files, the $version-$projtag.pb and pbrc files in the same directory.
     512
     513=back
    492514
    493515=head2 build2pkg
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r1551 r1554  
    9292#
    9393my $turl = "$pburl->{$ENV{'PBPROJ'}}/$tmp";
    94 $turl = $pburl->{$ENV{'PBPROJ'}} if (($scheme =~ /^file/) || ($scheme =~ /^(ht|f)tp/));
     94$turl = $pburl->{$ENV{'PBPROJ'}} if ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
    9595pb_cms_compliant(undef,'PBDIR',"$ENV{'PBPROJDIR'}/$tmp",$turl,$pbinit);
    9696
     
    108108    $ENV{'PBREVISION'}=$tmp;
    109109    $ENV{'PBCMSLOGFILE'}="git.log";
    110 } elsif (($scheme =~ /^file/) || ($scheme eq "ftp") || ($scheme eq "http")) {
     110} elsif (($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
    111111    $ENV{'PBREVISION'}="flat";
    112112    $ENV{'PBCMSLOGFILE'}="flat.log";
     
    432432        close(CL);
    433433        pb_system("$vcscmd log -v $pkgdir > $dest/$ENV{'PBCMSLOGFILE'}","Extracting log info from GIT");
    434     } elsif (($scheme =~ /^file/) || ($scheme eq "dir") || ($scheme eq "http") || ($scheme eq "ftp")) {
     434    } elsif (($scheme =~ /^(flat)|(ftp)|(http)|(file)|(dir)\b/o) {
    435435        pb_system("echo ChangeLog for $pkgdir > $dest/ChangeLog","Empty ChangeLog file created");
    436436    } elsif ($scheme =~ /^cvs/) {
Note: See TracChangeset for help on using the changeset viewer.