Browse Source
Merge pull request #8391 from abpframework/Refactor-MicroserviceServiceRandomPortStep
Fix MicroserviceServiceRandomPortStep in Microservice-Service creation
pull/8393/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
16 additions and
3 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/MicroserviceServiceRandomPortStep.cs
|
|
|
@ -59,9 +59,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|
|
|
return _tyeFileContent; |
|
|
|
} |
|
|
|
|
|
|
|
var solutionFolderPath = context.BuildArgs.ExtraProperties[NewCommand.Options.OutputFolder.Short] ?? |
|
|
|
context.BuildArgs.ExtraProperties[NewCommand.Options.OutputFolder.Long] ?? |
|
|
|
Directory.GetCurrentDirectory(); |
|
|
|
var solutionFolderPath = GetSolutionFolderPath(context); |
|
|
|
|
|
|
|
var tyeFilePath = Path.Combine(solutionFolderPath, "tye.yaml"); |
|
|
|
|
|
|
|
@ -74,5 +72,20 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps |
|
|
|
|
|
|
|
return _tyeFileContent; |
|
|
|
} |
|
|
|
|
|
|
|
private static string GetSolutionFolderPath(ProjectBuildContext context) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.ExtraProperties.ContainsKey(NewCommand.Options.OutputFolder.Short)) |
|
|
|
{ |
|
|
|
return context.BuildArgs.ExtraProperties[NewCommand.Options.OutputFolder.Short]; |
|
|
|
} |
|
|
|
|
|
|
|
if (context.BuildArgs.ExtraProperties.ContainsKey(NewCommand.Options.OutputFolder.Long)) |
|
|
|
{ |
|
|
|
return context.BuildArgs.ExtraProperties[NewCommand.Options.OutputFolder.Long]; |
|
|
|
} |
|
|
|
|
|
|
|
return Directory.GetCurrentDirectory(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|