Changeset 2022 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Env.pm


Ignore:
Timestamp:
Dec 6, 2015, 3:46:51 AM (8 years ago)
Author:
Bruno Cornec
Message:
  • Improve git support where pbconf is upstream in the main directory of a simple project
File:
1 edited

Legend:

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

    r1958 r2022  
    309309    #
    310310    pb_vcs_compliant("pbconfdir",'PBCONFDIR',"$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/pbconf",$pbconf{$ENV{'PBPROJ'}},$pbinit);
     311    my ($scheme, $account, $host, $port, $path) = pb_get_uri($pbconf{$ENV{'PBPROJ'}});
    311312
    312313    # Check where is our PBROOTDIR (release tag name can't be guessed the first time)
     
    327328        # transform in full path if relative
    328329        $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}/$ENV{'PBROOTDIR'}" if ($ENV{'PBROOTDIR'} !~ /^\//);
     330        # If git, then versions are in branch not in dirs.
     331        $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}" if ($scheme =~ /^git/);
    329332        pb_mkdir_p($ENV{'PBROOTDIR'}) if (defined $pbinit);
    330333        die "$ENV{'PBROOTDIR'} is not a directory" if (not -d $ENV{'PBROOTDIR'});
Note: See TracChangeset for help on using the changeset viewer.