Skip to content

Commit

Permalink
ci: Fixed cli tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 11, 2024
1 parent 695bf91 commit 558ab03
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/libs/AutoSDK.CLI/Commands/InitializeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,21 @@ await File.WriteAllTextAsync(

string Replace(string content)
{
var newContent = content
var newContent = content;

foreach (var (key, value) in replaces)
{
newContent = newContent.Replace(key, value, StringComparison.OrdinalIgnoreCase);
}

newContent = newContent
.Replace("$SolutionName$", solutionName, StringComparison.OrdinalIgnoreCase)
.Replace("$ApiName$", apiName, StringComparison.OrdinalIgnoreCase)
.Replace("$OpenApiSpec$", openApiSpec, StringComparison.OrdinalIgnoreCase)
.Replace("$CurrentYear$", DateTime.Now.Year.ToString(CultureInfo.InvariantCulture), StringComparison.OrdinalIgnoreCase)
.Replace("$CompanyName$", company, StringComparison.OrdinalIgnoreCase)
.Replace("$SolutionNameUppercase$", solutionName.ToUpperInvariant(), StringComparison.OrdinalIgnoreCase)
;
foreach (var (key, value) in replaces)
{
newContent = newContent.Replace(key, value, StringComparison.OrdinalIgnoreCase);
}

return newContent;
}
Expand Down

0 comments on commit 558ab03

Please sign in to comment.