Changeset 2305 in ProjectBuilder
- Timestamp:
- Sep 6, 2017, 7:36:28 PM (7 years ago)
- Location:
- devel/pb-modules/lib/ProjectBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Env.pm
r2292 r2305 260 260 261 261 my $pbconfpath = "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}"; 262 263 # Put under CMS the PBPROJ dir264 if ($action =~ /^newproj$/) {265 if (! -d "$pbconfpath") {266 # TODO: There is also the need to do267 # svn import svn://repo "$pbconfpath268 # in case it doesn't exist there269 pb_mkdir_p("$pbconfpath");270 }271 pb_vcs_add($pbconf{$ENV{'PBPROJ'}},"$pbconfpath");272 }273 262 274 263 # … … 1311 1300 } 1312 1301 pb_vcs_add($pbconf{$ENV{'PBPROJ'}},$ENV{'PBCONFDIR'}); 1313 my $msg = "updated to ".basename("$pbconfpath"); 1314 $msg = "Project $ENV{'PBPROJ'} creation" if (defined $pbinit); 1315 pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$pbconfpath",$msg); 1302 my $msg = "Project $ENV{'PBPROJ'} creation"; 1303 pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBCONFDIR'}",$msg); 1316 1304 } else { 1317 1305 pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}.yml in it\n"); -
devel/pb-modules/lib/ProjectBuilder/VCS.pm
r2284 r2305 694 694 pb_log(1,"pb_vcs_compliant useless\n"); 695 695 return; 696 } elsif (defined $pbinit) { 697 pb_mkdir_p("$ENV{$envar}"); 698 } elsif (! -d "$ENV{$envar}") { 696 } elsif ((defined $pbinit) || (! -d "$ENV{$envar}")) { 697 my $exportdir = $ENV{$envar}; 699 698 # Either we have a version in the uri, and it should be the same 700 699 # as the one in the envar. Or we should add the version to the uri 701 700 # But not if it's git as it manages version branches internally 702 if ((basename($uri) ne basename($ENV{$envar})) && ($scheme !~ /^git/)) { 703 $uri .= "/".basename($ENV{$envar}) 701 if ((basename($uri) ne basename($exportdir)) && ($scheme !~ /git/)) { 702 $uri .= "/".basename($exportdir); 703 } 704 if ((defined $pbinit) && ($scheme =~ /git/)) { 705 # If initializing remove the potential pbconf part if we treat pbconfdir 706 $exportdir =~ s|pbconf[/]*||; 704 707 } 705 708 pb_log(1,"Checking out $uri\n"); 706 709 # Create structure and remove end dir before exporting 707 pb_mkdir_p("$ENV{$envar}"); 708 pb_rm_rf($ENV{$envar}); 709 pb_vcs_checkout($scheme,$uri,$ENV{$envar}); 710 pb_mkdir_p("$exportdir"); 711 pb_rm_rf($exportdir); 712 pb_vcs_checkout($scheme,$uri,$exportdir); 713 if ((defined $pbinit) && ($scheme =~ /git/)) { 714 # And now created the potentially missin gpbconf dir 715 pb_mkdir_p("$exportdir/pbconf"); 716 } 710 717 } else { 711 718 pb_log(1,"$uri found locally, checking content\n");
Note:
See TracChangeset
for help on using the changeset viewer.