Changeset 2260


Ignore:
Timestamp:
Aug 30, 2017, 5:07:41 PM (4 weeks ago)
Author:
bruno
Message:

Fix pbroot handling for git+svn (test was wrong)

Location:
devel
Files:
2 edited

Legend:

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

    r2259 r2260  
    377377        $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}/$ENV{'PBROOTDIR'}" if ($ENV{'PBROOTDIR'} !~ /^\//);
    378378        # If git, then versions are in branch not in dirs, except for git+svn
    379         $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}" if (($scheme =~ /^git/) && ($scheme =~ /svn/));
     379        $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}" if (($scheme =~ /^git/) && ($scheme !~ /svn/));
    380380        pb_mkdir_p($ENV{'PBROOTDIR'}) if (defined $pbinit);
    381381        die "$ENV{'PBROOTDIR'} is not a directory" if (not -d $ENV{'PBROOTDIR'});
     
    384384
    385385    # Adds that conf file to the list to consider
    386     pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
     386    if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") {
     387        pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
     388    } elsif (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb") {
     389        pb_conf_update_v0("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb","$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
     390        pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml");
     391    }
    387392
    388393    return if ($action =~ /^(newver|getconf|setupve)$/);
     
    435440        }
    436441        die "Invalid tag name $ENV{'PBPROJTAG'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml" if ($ENV{'PBPROJTAG'} !~ /[0-9.]+/);
    437    
    438    
     442
    439443        if (not defined $ENV{'PBPACKAGER'}) {
    440444            if ((defined $pbpackager) && (defined $pbpackager->{$ENV{'PBPROJ'}})) {
  • devel/pb/lib/ProjectBuilder/Filter.pm

    r2256 r2260  
    9595        my $fyml = $f;
    9696        $fyml =~ s/\.pbf/.yml/;
    97         pb_update_conf_v0($f,$fyml);
     97        pb_conf_update_v0($f,$fyml);
    9898        my ($pburl) = pb_conf_get("pburl");
    9999        my ($scheme, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
Note: See TracChangeset for help on using the changeset viewer.