Browse Source
Merge pull request #8690 from abpframework/Cli-add-module-fix-angular-source-code-project-finder
Cli add-module: fix angular source code project finder
pull/8719/head
Alper Ebicoglu
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
24 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/SourceCodeDownloadService.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularSourceCodeAdder.cs
|
|
@ -203,30 +203,7 @@ namespace Volo.Abp.Cli.Commands.Services |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (zipEntryName.Contains(Path.Combine("angular/e2e"))) |
|
|
if (zipEntryName.StartsWith("angular/") && !zipEntryName.StartsWith("angular/projects")) |
|
|
{ |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
if (zipEntryName.Contains(Path.Combine("angular/src"))) |
|
|
|
|
|
{ |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
if (zipEntryName.Contains(Path.Combine("angular/node_modules"))) |
|
|
|
|
|
{ |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
if (zipEntryName.Contains(Path.Combine("angular/scripts"))) |
|
|
|
|
|
{ |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
if (zipEntryName.Contains(Path.Combine("angular/source-code-requirements"))) |
|
|
|
|
|
{ |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var fileName = Path.GetFileName(zipEntryName); |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(fileName) && zipEntryName.Equals("angular/" + fileName)) |
|
|
|
|
|
{ |
|
|
{ |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
@ -246,6 +246,12 @@ namespace Volo.Abp.Cli.ProjectModification |
|
|
var foldersUnderProject = Directory.GetDirectories(Path.Combine(folder, "projects")); |
|
|
var foldersUnderProject = Directory.GetDirectories(Path.Combine(folder, "projects")); |
|
|
foreach (var folderUnderProject in foldersUnderProject) |
|
|
foreach (var folderUnderProject in foldersUnderProject) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (Path.GetFileName(folderUnderProject) == "dev-app") |
|
|
|
|
|
{ |
|
|
|
|
|
Directory.Delete(folderUnderProject, true); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (Directory.Exists(Path.Combine(folder, Path.GetFileName(folderUnderProject)))) |
|
|
if (Directory.Exists(Path.Combine(folder, Path.GetFileName(folderUnderProject)))) |
|
|
{ |
|
|
{ |
|
|
continue; |
|
|
continue; |
|
|
|