Changeset 1097 in ProjectBuilder for devel/pb/lib/ProjectBuilder


Ignore:
Timestamp:
Oct 25, 2010, 12:26:55 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Fix #36 by adding new targets to pb with sbx2 suffix. They replace in feature the previous cms2 targets which now becomes really an extract from the Configuration Management System, where the former are from the exported content aka sandbox.
Location:
devel/pb/lib/ProjectBuilder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r940 r1097  
    5757
    5858my $pbinit = shift || undef;
     59my $param = shift || undef;
    5960
    6061my ($pburl) = pb_conf_get("pburl");
     
    7071    $ENV{'PBPROJDIR'} = "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}";
    7172}
     73# Expand potential env variable in it to allow string replacement
     74eval { $ENV{'PBPROJDIR'} =~ s/(\$ENV.+\})/$1/eeg };
     75
    7276
    7377# Computing the default dir for PBDIR.
     
    101105    $ENV{'PBCMSLOGFILE'}="flat.log";
    102106} 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    }
    105114    chomp($tmp);
    106115    $ENV{'PBREVISION'}=$tmp;
    107116    $ENV{'PBCMSLOGFILE'}="svn.log";
    108117} 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)`;
    110119    $tmp =~ s/\s+//;
    111120    chomp($tmp);
     
    267276    } else {
    268277        # 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");
    269279        $tmp1 = $uri;
    270280    }
  • devel/pb/lib/ProjectBuilder/Env.pm

    r1094 r1097  
    286286return if ($action =~ /^clean$/);
    287287
    288 if (($action =~ /^cms2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^web/)) {
     288if (($action =~ /^cms2/) || ($action =~ /^sbx2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/) || ($action =~ /^announce/) || ($action =~ /^web/)) {
    289289
    290290    #
Note: See TracChangeset for help on using the changeset viewer.