Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Aspire.Cli/Interaction/BannerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ public BannerService(ConsoleEnvironment consoleEnvironment)
public async Task DisplayBannerAsync(CancellationToken cancellationToken = default)
{
var cliVersion = VersionHelper.GetDefaultTemplateVersion();

// Strip build metadata (everything after '+') for display purposes.
var plusIndex = cliVersion.IndexOf('+', StringComparison.Ordinal);
if (plusIndex >= 0)
{
cliVersion = cliVersion[..plusIndex];
}
Comment on lines +55 to +60
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new behavior (stripping build metadata after '+') is user-visible but isn’t covered by an automated regression test. Consider adding coverage that asserts the banner’s version text does not include '+' build metadata (e.g., an E2E banner test that searches for absence of '+' on the version line, or a small unit test around an extracted helper used by BannerService).

Copilot uses AI. Check for mistakes.

var aspireWidth = s_aspireLines[0].TrimEnd().Length;
var welcomeText = RootCommandStrings.BannerWelcomeText;
var versionText = string.Format(CultureInfo.CurrentCulture, RootCommandStrings.BannerVersionFormat, cliVersion);
Expand Down
Loading