From 3c877d3960f2dee1360831b82b60fa50ec3df6d7 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 15 Dec 2022 14:19:28 +0300 Subject: [PATCH 1/2] Cli: show the current cli version --- .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index 9444381a0d..a7919e6567 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -50,14 +50,15 @@ public class CliService : ITransientDependency public async Task RunAsync(string[] args) { - Logger.LogInformation("ABP CLI (https://abp.io)"); + var currentCliVersion = await GetCurrentCliVersionInternalAsync(typeof(CliService).Assembly); + Logger.LogInformation($"ABP CLI {currentCliVersion} (https://abp.io)"); var commandLineArgs = CommandLineArgumentParser.Parse(args); #if !DEBUG if (!commandLineArgs.Options.ContainsKey("skip-cli-version-check")) { - await CheckCliVersionAsync(); + await CheckCliVersionAsync(currentCliVersion); } #endif try @@ -168,7 +169,7 @@ public class CliService : ITransientDependency } } - private async Task CheckCliVersionAsync() + private async Task CheckCliVersionAsync(SemanticVersion currentCliVersion) { if (!await IsLatestVersionCheckExpiredAsync()) { @@ -177,11 +178,8 @@ public class CliService : ITransientDependency var assembly = typeof(CliService).Assembly; var toolPath = GetToolPath(assembly); - var currentCliVersion = await GetCurrentCliVersionInternalAsync(assembly); var updateChannel = GetUpdateChannel(currentCliVersion); - Logger.LogInformation($"Version {currentCliVersion} ({updateChannel})"); - try { var latestVersion = await GetLatestVersion(updateChannel); From b6b299e683356756f85859ff746ac98bee38915c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20Ebi=C3=A7o=C4=9Flu?= <9526587+ebicoglu@users.noreply.github.com> Date: Fri, 16 Dec 2022 11:27:33 +0300 Subject: [PATCH 2/2] Update CliService.cs --- framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index a7919e6567..0b302520aa 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -51,7 +51,7 @@ public class CliService : ITransientDependency public async Task RunAsync(string[] args) { var currentCliVersion = await GetCurrentCliVersionInternalAsync(typeof(CliService).Assembly); - Logger.LogInformation($"ABP CLI {currentCliVersion} (https://abp.io)"); + Logger.LogInformation($"ABP CLI {currentCliVersion}"); var commandLineArgs = CommandLineArgumentParser.Parse(args);