diff --git a/Build/Program.cs b/Build/Program.cs index c11facf..2cbb8ca 100644 --- a/Build/Program.cs +++ b/Build/Program.cs @@ -18,10 +18,11 @@ } const string defaultNuGetSource = "https://api.nuget.org/v3/index.json"; +Environment.SetEnvironmentVariable("DOTNET_NUGET_SIGNATURE_VERIFICATION", "false"); var configuration = GetProperty("configuration", "Release"); var apiKey = GetProperty("apiKey", ""); -var integrationTests = bool.Parse(GetProperty("integrationTests", UnderTeamCity.ToString())); -var defaultVersion = NuGetVersion.Parse(GetProperty("version", "1.0.0-dev", UnderTeamCity)); +var integrationTests = bool.Parse(GetProperty("integrationTests", CI.ToString())); +var defaultVersion = NuGetVersion.Parse(GetProperty("version", "1.0.0-dev", CI)); var outputDir = Path.Combine(currentDir, "CSharpInteractive", "bin", configuration); var templateOutputDir = Path.Combine(currentDir, "CSharpInteractive.Templates", "bin", configuration); var dockerLinuxTests = HasLinuxDocker(); diff --git a/Build/Tools.cs b/Build/Tools.cs index 19e313d..d6c3684 100644 --- a/Build/Tools.cs +++ b/Build/Tools.cs @@ -2,10 +2,13 @@ using HostApi; using NuGet.Versioning; // ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming internal static class Tools { - public static bool UnderTeamCity => Environment.GetEnvironmentVariable("TEAMCITY_VERSION") != default; + public static bool CI => + Environment.GetEnvironmentVariable("TEAMCITY_VERSION") is not null + || Environment.GetEnvironmentVariable("CI") == "true"; public static NuGetVersion GetNextNuGetVersion(NuGetRestoreSettings settings, NuGetVersion defaultVersion) { @@ -94,7 +97,7 @@ public static void Run(ICommandLine commandLine) public static void Exit() { - if (!Console.IsInputRedirected && !UnderTeamCity) + if (!Console.IsInputRedirected && !CI) { var foregroundColor = Console.ForegroundColor; try