Skip to content

Commit

Permalink
Merge pull request #5577 from Balkoth/gencsharp_co
Browse files Browse the repository at this point in the history
Display clean output hint when generating CSharp client only when --clean-output is missing
  • Loading branch information
baywet authored Oct 11, 2024
2 parents f2860bc + 08d9387 commit 5ec4690
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed cyclic dependencies in generated Go code. [#2834](https://github.com/microsoft/kiota/issues/2834)
- Fixed a bug where default output folder is created on plugin edit and generate commands. [#5510](https://github.com/microsoft/kiota/issues/5429)
- Changed GeneratedCode attribute applied when generating CSharp to only include the major version of Kiota. [#5489](https://github.com/microsoft/kiota/issues/5489)
- Fixed genarating CSharp client displays clean hint regardless of whether --clean-output is already passed [#5576](https://github.com/microsoft/kiota/issues/5576)

## [1.19.0] - 2024-10-03

Expand Down
3 changes: 2 additions & 1 deletion src/kiota/Handlers/KiotaGenerateCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ public override async Task<int> InvokeAsync(InvocationContext context)
else
{
DisplaySuccess("Generation skipped as no changes were detected");
DisplayCleanHint("generate");
if (!cleanOutput)
DisplayCleanHint("generate");
}
var manifestResult = await builder.GetApiManifestDetailsAsync(true, cancellationToken).ConfigureAwait(false);
var manifestPath = manifestResult is null ? string.Empty : Configuration.Generation.ApiManifestPath;
Expand Down
2 changes: 1 addition & 1 deletion src/kiota/Handlers/KiotaUpdateCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public override async Task<int> InvokeAsync(InvocationContext context)
DisplaySuccess($"Update of {locks.Length} clients completed successfully");
foreach (var configuration in configurations)
DisplayInfoHint(configuration.Language, configuration.OpenAPIFilePath, string.Empty);
if (Array.Exists(results, static x => x))
if (Array.Exists(results, static x => x) && !cleanOutput)
DisplayCleanHint("update");
return 0;
}
Expand Down

0 comments on commit 5ec4690

Please sign in to comment.