Browse Source

Revert "update nuke."

This reverts commit 3feb132de9.
pull/9028/head
Dan Walmsley 4 years ago
parent
commit
9814d63f07
  1. 6
      nukebuild/Build.cs
  2. 4
      nukebuild/BuildParameters.cs
  3. 4
      nukebuild/DotNetConfigHelper.cs
  4. 2
      nukebuild/_build.csproj

6
nukebuild/Build.cs

@ -39,7 +39,6 @@ partial class Build : NukeBuild
BuildParameters Parameters { get; set; } BuildParameters Parameters { get; set; }
protected override void OnBuildInitialized() protected override void OnBuildInitialized()
{ {
Console.WriteLine($"{Solution.Name}");
Parameters = new BuildParameters(this); Parameters = new BuildParameters(this);
Information("Building version {0} of Avalonia ({1}) using version {2} of Nuke.", Information("Building version {0} of Avalonia ({1}) using version {2} of Nuke.",
Parameters.Version, Parameters.Version,
@ -144,7 +143,6 @@ partial class Build : NukeBuild
void RunCoreTest(string projectName) void RunCoreTest(string projectName)
{ {
Information($"Running tests from {projectName}"); Information($"Running tests from {projectName}");
Console.WriteLine(Solution == null);
var project = Solution.GetProject(projectName).NotNull("project != null"); var project = Solution.GetProject(projectName).NotNull("project != null");
foreach (var fw in project.GetTargetFrameworks()) foreach (var fw in project.GetTargetFrameworks())
@ -165,7 +163,7 @@ partial class Build : NukeBuild
.EnableNoBuild() .EnableNoBuild()
.EnableNoRestore() .EnableNoRestore()
.When(Parameters.PublishTestResults, _ => _ .When(Parameters.PublishTestResults, _ => _
.SetLoggers("trx") .SetLogger("trx")
.SetResultsDirectory(Parameters.TestResultsRoot))); .SetResultsDirectory(Parameters.TestResultsRoot)));
} }
} }
@ -231,7 +229,7 @@ partial class Build : NukeBuild
$"{XunitPath.DoubleQuoteIfNeeded()} --propagate-exit-code -- {testAssembly}", $"{XunitPath.DoubleQuoteIfNeeded()} --propagate-exit-code -- {testAssembly}",
timeout: 120_000); timeout: 120_000);
} }
ControlFlow.ExecuteWithRetry(DoMemoryTest, delay: TimeSpan.FromSeconds(3)); ControlFlow.ExecuteWithRetry(DoMemoryTest, waitInSeconds: 3);
}); });
Target ZipFiles => _ => _ Target ZipFiles => _ => _

4
nukebuild/BuildParameters.cs

@ -74,11 +74,11 @@ public partial class Build
MSBuildSolution = RootDirectory / "dirs.proj"; MSBuildSolution = RootDirectory / "dirs.proj";
// PARAMETERS // PARAMETERS
IsLocalBuild = NukeBuild.IsLocalBuild; IsLocalBuild = Host == HostType.Console;
IsRunningOnUnix = Environment.OSVersion.Platform == PlatformID.Unix || IsRunningOnUnix = Environment.OSVersion.Platform == PlatformID.Unix ||
Environment.OSVersion.Platform == PlatformID.MacOSX; Environment.OSVersion.Platform == PlatformID.MacOSX;
IsRunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); IsRunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
IsRunningOnAzure = NukeBuild.IsServerBuild || IsRunningOnAzure = Host == HostType.AzurePipelines ||
Environment.GetEnvironmentVariable("LOGNAME") == "vsts"; Environment.GetEnvironmentVariable("LOGNAME") == "vsts";
if (IsRunningOnAzure) if (IsRunningOnAzure)

4
nukebuild/DotNetConfigHelper.cs

@ -46,7 +46,7 @@ public class DotNetConfigHelper
public DotNetConfigHelper SetVerbosity(DotNetVerbosity verbosity) public DotNetConfigHelper SetVerbosity(DotNetVerbosity verbosity)
{ {
Build = Build?.SetVerbosity(verbosity); Build = Build?.SetVerbosity(verbosity);
Pack = Pack?.SetVerbosity(verbosity); Pack = Pack?.SetVerbostiy(verbosity);
Test = Test?.SetVerbosity(verbosity); Test = Test?.SetVerbosity(verbosity);
return this; return this;
} }
@ -54,4 +54,4 @@ public class DotNetConfigHelper
public static implicit operator DotNetConfigHelper(DotNetBuildSettings s) => new DotNetConfigHelper(s); public static implicit operator DotNetConfigHelper(DotNetBuildSettings s) => new DotNetConfigHelper(s);
public static implicit operator DotNetConfigHelper(DotNetPackSettings s) => new DotNetConfigHelper(s); public static implicit operator DotNetConfigHelper(DotNetPackSettings s) => new DotNetConfigHelper(s);
public static implicit operator DotNetConfigHelper(DotNetTestSettings s) => new DotNetConfigHelper(s); public static implicit operator DotNetConfigHelper(DotNetTestSettings s) => new DotNetConfigHelper(s);
} }

2
nukebuild/_build.csproj

@ -11,7 +11,7 @@
</PropertyGroup> </PropertyGroup>
<Import Project="..\build\JetBrains.dotMemoryUnit.props" /> <Import Project="..\build\JetBrains.dotMemoryUnit.props" />
<ItemGroup> <ItemGroup>
<PackageReference Include="Nuke.Common" Version="6.2.1" /> <PackageReference Include="Nuke.Common" Version="5.0.0" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" /> <PackageReference Include="xunit.runner.console" Version="2.3.1" />
<PackageReference Include="vswhere" Version="2.6.7" Condition=" '$(OS)' == 'Windows_NT' " /> <PackageReference Include="vswhere" Version="2.6.7" Condition=" '$(OS)' == 'Windows_NT' " />
<PackageReference Include="ILRepack.NETStandard" Version="2.0.4" /> <PackageReference Include="ILRepack.NETStandard" Version="2.0.4" />

Loading…
Cancel
Save