private async Task PrintStrykerVersionInformationAsync() { var assembly = Assembly.GetExecutingAssembly(); var assemblyVersion = assembly.GetName().Version; var currentVersion = SemanticVersion.Parse($"{assemblyVersion.Major}.{assemblyVersion.Minor}.{assemblyVersion.Build}"); Console.WriteLine($" Version: {Output.Green(currentVersion.ToString())} (beta)"); Console.WriteLine(); var nugetInfo = await StrykerNugetFeedInfo.Create(); var latestVersion = nugetInfo?.LatestVersion; if (latestVersion != null && latestVersion != currentVersion) { Console.WriteLine(Output.Yellow($@" A new version of Stryker.NET ({latestVersion}) is available. Please consider upgrading using `dotnet tool update -g dotnet-stryker`")); Console.WriteLine(); } }
private async Task PrintStrykerVersionInformationAsync() { var chalk = new Chalk(); var assembly = Assembly.GetExecutingAssembly(); var assemblyVersion = assembly.GetName().Version; var currentVersion = $"{assemblyVersion.Major}.{assemblyVersion.Minor}.{assemblyVersion.Build}"; Console.Write("Version: "); chalk.Green(currentVersion); Console.WriteLine(" (beta)"); Console.WriteLine(); var nugetInfo = await StrykerNugetFeedInfo.Create(); var latestVersion = nugetInfo?.LatestVersion; if (latestVersion != null && latestVersion != currentVersion) { chalk.Yellow($@"A new version of Stryker.NET ({latestVersion}) is available. Please consider upgrading using `dotnet tool update -g dotnet-stryker` {Environment.NewLine}"); Console.WriteLine(); } }