From 5f3e1791687f41297adec828f174bfb79d395b63 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Thu, 29 Oct 2020 23:38:57 +0100 Subject: [PATCH 1/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 348f55ef5..bf2984622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [vNext] ## [0.25.0] / 2020-10-26 +- Removed `Configuration` from `Nuke.Common` and moved it to template - Changed `InjectionAttribute` to catch exceptions and report as warnings - Changed `ToolPathResolver` to ignore casing - Changed `ToolSettings` to prefix common properties with `Process` From 3e4175ae47dc65ca1b2dcaa864162609de9af0a2 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Fri, 6 Nov 2020 02:35:38 +0100 Subject: [PATCH 2/7] Fix missing namespace import --- source/Nuke.GlobalTool/templates/Build.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Nuke.GlobalTool/templates/Build.cs b/source/Nuke.GlobalTool/templates/Build.cs index ab46adcec..03020c6c8 100644 --- a/source/Nuke.GlobalTool/templates/Build.cs +++ b/source/Nuke.GlobalTool/templates/Build.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using Nuke.Common; +using Nuke.Common.CI; using Nuke.Common.Execution; using Nuke.Common.Git; // GIT using Nuke.Common.IO; From a1961c0b3fea12043d3c95f148e712a76c4930b3 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Sat, 31 Oct 2020 02:41:39 +0100 Subject: [PATCH 3/7] Update bootstrapping scripts --- build.ps1 | 44 ++++++++++++++++++-------------------------- build.sh | 42 +++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 51 deletions(-) diff --git a/build.ps1 b/build.ps1 index 050ccea4c..4d8ab8bac 100644 --- a/build.ps1 +++ b/build.ps1 @@ -23,7 +23,6 @@ $DotNetChannel = "Current" $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 $env:DOTNET_MULTILEVEL_LOOKUP = 0 -$env:NUGET_XMLDOC_MODE = "skip" ########################################################################### # EXECUTION @@ -35,46 +34,39 @@ function ExecSafe([scriptblock] $cmd) { } # Print environment variables -Get-Item -Path Env:* +Get-Item -Path Env:* | Sort-Object -Property Name | ForEach-Object {"{0}={1}" -f $_.Name,$_.Value} -# Check if any dotnet is installed -if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue)) { - ExecSafe { & dotnet --info } +# If dotnet CLI is installed globally and it matches requested version, use for execution +if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` + $(dotnet --version) -and $LASTEXITCODE -eq 0) { + $env:DOTNET_EXE = (Get-Command "dotnet").Path } - -# If global.json exists, load expected version -if (Test-Path $DotNetGlobalFile) { - $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) - if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { - $DotNetVersion = $DotNetGlobal.sdk.version - } -} - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -#if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` -# (!(Test-Path variable:DotNetVersion) -or $(& dotnet --version | Select-Object -First 1) -eq $DotNetVersion)) { -# $env:DOTNET_EXE = (Get-Command "dotnet").Path -#} -#else { - $DotNetDirectory = "$TempDirectory\dotnet-win" - $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" - +else { # Download install script $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) + # If global.json exists, load expected version + if (Test-Path $DotNetGlobalFile) { + $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) + if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { + $DotNetVersion = $DotNetGlobal.sdk.version + } + } + # Install by channel or version + $DotNetDirectory = "$TempDirectory\dotnet-win" if (!(Test-Path variable:DotNetVersion)) { ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } } else { ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } } - ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version "2.2.101" -NoPath } -#} + $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" +} Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" -ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false --ignore-failed-sources } +ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary } ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments } diff --git a/build.sh b/build.sh index a6a906f6f..f80ef6de6 100755 --- a/build.sh +++ b/build.sh @@ -19,7 +19,6 @@ DOTNET_CHANNEL="Current" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 -export NUGET_XMLDOC_MODE="skip" ########################################################################### # EXECUTION @@ -30,44 +29,37 @@ function FirstJsonValue { } # Print environment variables -set - -# Check if any dotnet is installed -if [[ -x "$(command -v dotnet)" ]]; then - dotnet --info -fi - -# If global.json exists, load expected version -if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then - DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")") - if [[ "$DOTNET_VERSION" == "" ]]; then - unset DOTNET_VERSION - fi -fi - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -#if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version 2>&1) == "$DOTNET_VERSION") ]]; then -# export DOTNET_EXE="$(command -v dotnet)" -#else - DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" - export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" +env | sort +# If dotnet CLI is installed globally and it matches requested version, use for execution +if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then + export DOTNET_EXE="$(command -v dotnet)" +else # Download install script DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" mkdir -p "$TEMP_DIRECTORY" curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" chmod +x "$DOTNET_INSTALL_FILE" + # If global.json exists, load expected version + if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then + DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")") + if [[ "$DOTNET_VERSION" == "" ]]; then + unset DOTNET_VERSION + fi + fi + # Install by channel or version + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" if [[ -z ${DOTNET_VERSION+x} ]]; then "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path fi - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "2.2.101" --no-path -#fi + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" +fi echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" -"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false --ignore-failed-sources +"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary "$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@" From 4d96692a8c709996a47a5916934b66ee53de2aab Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Wed, 11 Nov 2020 19:26:04 +0100 Subject: [PATCH 4/7] Update target framework to netcoreapp3.1 --- source/Nuke.GlobalTool/Program.Setup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Nuke.GlobalTool/Program.Setup.cs b/source/Nuke.GlobalTool/Program.Setup.cs index e6cc86153..62135ca22 100644 --- a/source/Nuke.GlobalTool/Program.Setup.cs +++ b/source/Nuke.GlobalTool/Program.Setup.cs @@ -28,7 +28,7 @@ partial class Program private const string PLATFORM_NETCORE = "netcore"; private const string PLATFORM_NETFX = "netfx"; private const string FRAMEWORK_NETFX = "net472"; - private const string FRAMEWORK_NETCORE = "netcoreapp3.0"; + private const string FRAMEWORK_NETCORE = "netcoreapp3.1"; private const string FORMAT_SDK = "sdk"; private const string FORMAT_LEGACY = "legacy"; From d41ec4542efd7a3a0218bd71ed331658862c2a54 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Wed, 11 Nov 2020 19:26:53 +0100 Subject: [PATCH 5/7] Update to net5.0 --- build.ps1 | 1 + build.sh | 1 + build/_build.csproj | 2 +- global.json | 2 +- source/Nuke.Common/Nuke.Common.csproj | 8 ++++---- source/Nuke.GlobalTool/Nuke.GlobalTool.csproj | 2 +- source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj | 4 ++-- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/build.ps1 b/build.ps1 index 4d8ab8bac..a83bff234 100644 --- a/build.ps1 +++ b/build.ps1 @@ -23,6 +23,7 @@ $DotNetChannel = "Current" $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 $env:DOTNET_MULTILEVEL_LOOKUP = 0 +$env:DOTNET_ROLL_FORWARD = "Major" ########################################################################### # EXECUTION diff --git a/build.sh b/build.sh index f80ef6de6..cb3ec1f53 100755 --- a/build.sh +++ b/build.sh @@ -19,6 +19,7 @@ DOTNET_CHANNEL="Current" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 +export DOTNET_ROLL_FORWARD="Major" ########################################################################### # EXECUTION diff --git a/build/_build.csproj b/build/_build.csproj index 913058390..1ba0ac5bd 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -4,7 +4,7 @@ Exe - netcoreapp3.1 + net5.0 CS0649;CS0169 .\.. diff --git a/global.json b/global.json index d50ea5ac2..208bc74fb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.100", + "version": "5.0.100", "rollForward": "latestMinor" } } diff --git a/source/Nuke.Common/Nuke.Common.csproj b/source/Nuke.Common/Nuke.Common.csproj index f0c373075..7759db8c0 100644 --- a/source/Nuke.Common/Nuke.Common.csproj +++ b/source/Nuke.Common/Nuke.Common.csproj @@ -16,10 +16,10 @@ - - - - + + + + diff --git a/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj b/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj index 90812a73d..2375f4c63 100644 --- a/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj +++ b/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1;netcoreapp3.1 + netcoreapp2.1;netcoreapp3.1;net5.0 true nuke false diff --git a/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj b/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj index 61cac840a..74b8f1593 100644 --- a/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj +++ b/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj @@ -11,8 +11,8 @@ - - + + From 107c994826eaa1de0d211f55b112225d976ad8e9 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Thu, 12 Nov 2020 15:31:12 +0100 Subject: [PATCH 6/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2984622..61519f601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [vNext] +- Fixed version number ## [0.25.0] / 2020-10-26 - Removed `Configuration` from `Nuke.Common` and moved it to template From d7441a634d4ebeb409c63badcb67ea1cb5a23557 Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Thu, 12 Nov 2020 15:41:00 +0100 Subject: [PATCH 7/7] Finalize CHANGELOG.md for 5.0.0 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61519f601..0ebcddad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [vNext] + +## [5.0.0] / 2020-11-12 - Fixed version number ## [0.25.0] / 2020-10-26 @@ -637,7 +639,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added CLT tasks for Git - Fixed background color in console output -[vNext]: git@github.com:nuke-build/nuke/compare/0.25.0...HEAD +[vNext]: git@github.com:nuke-build/nuke/compare/5.0.0...HEAD +[5.0.0]: git@github.com:nuke-build/nuke/compare/0.25.0...5.0.0 [0.25.0]: git@github.com:nuke-build/nuke/compare/0.24.11...0.25.0 [0.24.11]: git@github.com:nuke-build/nuke/compare/0.24.10...0.24.11 [0.24.10]: git@github.com:nuke-build/nuke/compare/0.24.9...0.24.10