Skip to content

Commit

Permalink
Bumped Nuke to v6.1.2
Browse files Browse the repository at this point in the history
This should fix our windows-latest build issues I think.
  • Loading branch information
valadas committed Jul 27, 2022
1 parent 8f8384c commit 9511d62
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.ps1
Expand Up @@ -63,7 +63,7 @@ else {
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
2 changes: 1 addition & 1 deletion build.sh
Expand Up @@ -56,7 +56,7 @@ else
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
fi

echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
15 changes: 7 additions & 8 deletions build/Build.cs
Expand Up @@ -27,16 +27,15 @@
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.MacOsLatest,
GitHubActionsImage.UbuntuLatest,
ImportGitHubTokenAs = "GithubToken",
ImportSecrets = new[] { "GithubToken" },
OnPullRequestBranches = new[] { "main" },
InvokedTargets = new[] { nameof(Compile) })]
[GitHubActions(
"Deploy",
GitHubActionsImage.WindowsLatest,
ImportGitHubTokenAs = "GithubToken",
ImportSecrets = new[] { "GithubToken", "ACCESS_TOKEN" },
OnPushBranches = new[] { "main" },
InvokedTargets = new[] { nameof(Deploy) },
ImportSecrets = new[] { "ACCESS_TOKEN" })]
InvokedTargets = new[] { nameof(Deploy) })]
class Build : NukeBuild
{
/// Support plugins are available for:
Expand Down Expand Up @@ -97,7 +96,7 @@ class Build : NukeBuild
.Executes(() =>
{
// Prevents a bug where git sends ok message to the error output sink
GitLogger = (type, output) => Logger.Info(output);
GitLogger = (type, output) => Serilog.Log.Information(output);
Git($"clone https://github.com/dnnsoftware/Dnn.Platform.git {dnnPlatformDirectory}");
});

Expand Down Expand Up @@ -152,7 +151,7 @@ private bool IncludeApi()
.Executes(() =>
{
// Prevents a bug where git sends ok message to the error output sink
GitLogger = (type, output) => Logger.Info(output);
GitLogger = (type, output) => Serilog.Log.Information(output);
// Because in CI we are in detached head,
// we create a local deploy branch to track our commit.
Expand All @@ -167,11 +166,11 @@ private bool IncludeApi()
var token = Environment.GetEnvironmentVariable("ACCESS_TOKEN");
if (string.IsNullOrEmpty(token))
{
Logger.Warn("No api key specified.");
Serilog.Log.Warning("No api key specified.");
}
else
{
Logger.Info("Api key created.");
Serilog.Log.Information("Api key created.");
WriteAllText(filePath, token);
}
});
Expand Down
4 changes: 2 additions & 2 deletions build/_build.csproj
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="5.3.0" />
<PackageReference Include="Nuke.Common" Version="6.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions global.json
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "6.0.302"
}
}

0 comments on commit 9511d62

Please sign in to comment.