From 0c47fc299acfe7f1d4bb9160c513cbe980744edf Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Thu, 10 Jan 2019 09:32:38 +0300 Subject: [PATCH] Print dotnet and mono versions --- nukebuild/Build.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nukebuild/Build.cs b/nukebuild/Build.cs index c8d35cd877..bb31034299 100644 --- a/nukebuild/Build.cs +++ b/nukebuild/Build.cs @@ -57,6 +57,17 @@ partial class Build : NukeBuild Information("IsReleasable: " + Parameters.IsReleasable); Information("IsMyGetRelease: " + Parameters.IsMyGetRelease); Information("IsNuGetRelease: " + Parameters.IsNuGetRelease); + + void ExecWait(string preamble, string command, string args) + { + Console.WriteLine(preamble); + Process.Start(new ProcessStartInfo(command, args) {UseShellExecute = false}).WaitForExit(); + } + ExecWait("dotnet version:", "dotnet", "--version"); + if (Parameters.IsRunningOnUnix) + ExecWait("Mono version:", "mono", "--version"); + + } Target Clean => _ => _.Executes(() =>