diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 93ddd446c..8f6a83bec 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,6 +2,7 @@ * Fix: Storing events in MS SQL Server using `MsSqlEventPersistence` now correctly handles non-ANSI unicode characters in strings. +* Fix: Source link integration now works correctly ### New in 0.71.3834 (released 2019-04-17) diff --git a/Source/Common.props b/Source/Common.props index 453362dcb..54e690304 100644 --- a/Source/Common.props +++ b/Source/Common.props @@ -1,10 +1,11 @@ - embedded True true true true + portable snupkg + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - \ No newline at end of file + diff --git a/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj b/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj index a54693a44..9a9917758 100644 --- a/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj +++ b/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj @@ -2,7 +2,7 @@ net461 - false + False diff --git a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj index 167a69879..91b85f1f0 100644 --- a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj +++ b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj @@ -1,5 +1,5 @@ - + netstandard2.0 True @@ -16,7 +16,7 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD @@ -24,7 +24,7 @@ - + diff --git a/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj b/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj index a65c955ac..ff1e3969e 100644 --- a/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj +++ b/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj index d0cdd87a1..9be2a3ecc 100644 --- a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj +++ b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj @@ -16,22 +16,27 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD + + + + - + + diff --git a/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj b/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj index 64c21f448..dd1ce9154 100644 --- a/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj +++ b/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj @@ -2,7 +2,7 @@ net461 - false + False diff --git a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj index f02d9fbb0..87a2c94b3 100644 --- a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj +++ b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj @@ -1,5 +1,5 @@ - + netstandard2.0 True @@ -16,7 +16,7 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD @@ -24,7 +24,7 @@ - + diff --git a/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj b/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj index 743244fb6..f8c2d74f1 100644 --- a/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj +++ b/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj index 2c6155a3c..5871fc6bf 100644 --- a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj +++ b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj @@ -16,18 +16,17 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD + - - - - + + diff --git a/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj b/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj index 220cada80..c8b036cd7 100644 --- a/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj +++ b/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj @@ -2,7 +2,7 @@ net461 - false + False diff --git a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj index 288f6e353..c451fb3c1 100644 --- a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj +++ b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj @@ -16,18 +16,21 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD + 2.1.0 + - + + diff --git a/Source/EventFlow.EventStores.EventStore.Tests/EventFlow.EventStores.EventStore.Tests.csproj b/Source/EventFlow.EventStores.EventStore.Tests/EventFlow.EventStores.EventStore.Tests.csproj index f40d93e94..ce198bdf4 100644 --- a/Source/EventFlow.EventStores.EventStore.Tests/EventFlow.EventStores.EventStore.Tests.csproj +++ b/Source/EventFlow.EventStores.EventStore.Tests/EventFlow.EventStores.EventStore.Tests.csproj @@ -4,6 +4,7 @@ net462 True False + False diff --git a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj index c8dd0aaf4..5f8a10edb 100644 --- a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj +++ b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj @@ -16,22 +16,23 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + + + - + + diff --git a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj index ac4539cc9..bd7540c23 100644 --- a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj +++ b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj b/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj index 049d91e60..058d1fda4 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj +++ b/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj b/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj index 08e3c55a8..1e2c478f8 100644 --- a/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj +++ b/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj b/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj index 1bbd88abf..932d941f1 100644 --- a/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj +++ b/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj index 64c83a387..e6e2930b3 100644 --- a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj +++ b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj @@ -16,18 +16,17 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + - + + diff --git a/Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj b/Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj index 5c58ef61a..07e909fcb 100644 --- a/Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj +++ b/Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj @@ -2,6 +2,7 @@ net461 + False diff --git a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj index 7360bd74c..d9a9d7916 100644 --- a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj +++ b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj @@ -16,7 +16,7 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US True CQRS ES event sourcing MongoDB @@ -24,7 +24,7 @@ - + diff --git a/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj b/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj index 3873e3e67..0cd335cf2 100644 --- a/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj +++ b/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj index e1d82cbd9..c43279aa1 100644 --- a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj +++ b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj @@ -16,20 +16,20 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + - + + + diff --git a/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj b/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj index bf2e6a6fd..c3f84f387 100644 --- a/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj +++ b/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Owin/EventFlow.Owin.csproj b/Source/EventFlow.Owin/EventFlow.Owin.csproj index e705b7458..13fba4189 100644 --- a/Source/EventFlow.Owin/EventFlow.Owin.csproj +++ b/Source/EventFlow.Owin/EventFlow.Owin.csproj @@ -16,17 +16,16 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + - + + diff --git a/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj b/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj index 13dd078ca..7c40ead14 100644 --- a/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj +++ b/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj index aa11a40d7..1e16377f4 100644 --- a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj +++ b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj @@ -16,13 +16,10 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - @@ -38,7 +35,7 @@ - + diff --git a/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj b/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj index 6130cac07..251eb63a7 100644 --- a/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj +++ b/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj index acd41f673..47f1ac1b3 100644 --- a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj +++ b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj @@ -16,18 +16,17 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + + - + \ No newline at end of file diff --git a/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj b/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj index 8971d9153..ddfb27c95 100644 --- a/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj +++ b/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj index 7f6a24516..8634491d6 100644 --- a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj +++ b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj @@ -16,18 +16,17 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + - + + diff --git a/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj b/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj index 1582e7b4a..de14fce60 100644 --- a/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj +++ b/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow.Sql/EventFlow.Sql.csproj b/Source/EventFlow.Sql/EventFlow.Sql.csproj index a47035bb5..39c386854 100644 --- a/Source/EventFlow.Sql/EventFlow.Sql.csproj +++ b/Source/EventFlow.Sql/EventFlow.Sql.csproj @@ -16,23 +16,23 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD - - - + - + + + diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index ad3c8bf8c..30848e1d5 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -20,20 +20,23 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD + - + + + diff --git a/Source/EventFlow.Tests/EventFlow.Tests.csproj b/Source/EventFlow.Tests/EventFlow.Tests.csproj index c37ac947d..b9ab4b3c3 100644 --- a/Source/EventFlow.Tests/EventFlow.Tests.csproj +++ b/Source/EventFlow.Tests/EventFlow.Tests.csproj @@ -4,6 +4,7 @@ net452 True False + False diff --git a/Source/EventFlow/EventFlow.csproj b/Source/EventFlow/EventFlow.csproj index 6d01e8b85..298dc7272 100644 --- a/Source/EventFlow/EventFlow.csproj +++ b/Source/EventFlow/EventFlow.csproj @@ -16,23 +16,26 @@ https://github.com/eventflow/EventFlow http://docs.geteventflow.net/ https://raw.githubusercontent.com/eventflow/EventFlow/develop/icon-128.png - https://raw.githubusercontent.com/eventflow/EventFlow/develop/LICENSE + MIT en-US UPDATED BY BUILD bin\$(Configuration)\$(TargetFramework)\EventFlow.xml 1701;1702;1705;1591 + LIBLOG_PORTABLE + - + All + diff --git a/appveyor.yml b/appveyor.yml index 0bccf8e03..d7bce27a1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ version: 0.72.{build} skip_tags: true build_script: - - cmd: powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up_integration-test-env.ps1; .\build.ps1 -Target All;" + - cmd: powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up_integration-test-env.ps1; .\build.ps1 --bootstrap; .\build.ps1 -Target All;" image: Visual Studio 2017 diff --git a/build.cake b/build.cake index 5e8da2f34..3be97527f 100644 --- a/build.cake +++ b/build.cake @@ -25,8 +25,10 @@ #r "System.IO.Compression.FileSystem" #r "System.Xml" +#module nuget:?package=Cake.DotNetTool.Module #tool "nuget:?package=NUnit.ConsoleRunner" #tool "nuget:?package=OpenCover" +#tool "dotnet:?package=sourcelink" using System.IO.Compression; using System.Net; @@ -93,7 +95,6 @@ Task("Build") .Append(GetDotNetCoreArgsVersions()) .Append("/p:ci=true") .Append("/p:SourceLinkEnabled=true") - .AppendSwitch("/p:DebugType","=","Full") .Append("/p:TreatWarningsAsErrors=true") }); }); @@ -143,9 +144,29 @@ Task("Package") } }); +// ===================================================================================================== +Task("ValidateSourceLink") + .IsDependentOn("Package") + .Does(() => + { + var files = GetFiles($"./Build/Packages/EventFlow*.nupkg"); + if (!files.Any()) + { + throw new Exception("No NuGet packages found!"); + } + + foreach(var file in files) + { + var filePath = $"{file}".Replace("/", "\\"); + Information("Validating SourceLink for NuGet file: {0}", filePath); + ExecuteCommand("sourcelink", $"test {filePath}"); + } + }); + // ===================================================================================================== Task("All") .IsDependentOn("Package") + //.IsDependentOn("ValidateSourceLink") builds on AppVeyor fail for some unknown reason .Does(() => { @@ -171,27 +192,33 @@ void SetReleaseNotes(string filePath) { var releaseNotes = string.Join(Environment.NewLine, RELEASE_NOTES.Notes); + SetXmlNode( + filePath, + "Project/PropertyGroup/PackageReleaseNotes", + releaseNotes); +} + +void SetXmlNode(string filePath, string xmlPath, string content) +{ var xmlDocument = new XmlDocument(); xmlDocument.Load(filePath); - var node = xmlDocument.SelectSingleNode("Project/PropertyGroup/PackageReleaseNotes") as XmlElement; + var node = xmlDocument.SelectSingleNode(xmlPath) as XmlElement; if (node == null) { - throw new Exception(string.Format( - "Project {0} does not have a `UPDATED BY BUILD` property", - filePath)); + throw new Exception($"Project {filePath} does not have a {xmlPath} property"); } if (!AppVeyor.IsRunningOnAppVeyor) { - Information("Skipping update of release notes"); + Information($"Skipping update {xmlPath} in {filePath}"); return; } else { - Information(string.Format("Setting release notes in '{0}'", filePath)); + Information($"Setting {xmlPath} in {filePath}"); - node.InnerText = releaseNotes; + node.InnerText = content; xmlDocument.Save(filePath); } @@ -285,13 +312,14 @@ string ExecuteCommand(string exePath, string arguments = null, string workingDir throw new Exception("Failed to stop process!"); } - Debug(output); - if (process.ExitCode != 0) { + Error(output); throw new Exception(string.Format("Error code {0} was returned", process.ExitCode)); } + Debug(output); + return output; } } diff --git a/build.cmd b/build.cmd index b99c394a5..76e5f786e 100644 --- a/build.cmd +++ b/build.cmd @@ -1 +1,3 @@ +set CAKE_SETTINGS_SKIPPACKAGEVERSIONCHECK=true +powershell -NoProfile -ExecutionPolicy unrestricted -Command .\build.ps1 --bootstrap powershell -NoProfile -ExecutionPolicy unrestricted -Command .\build.ps1 -Target %1 diff --git a/build.ps1 b/build.ps1 index e53d2a288..7f1f813d7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -25,10 +25,6 @@ Specifies the amount of information to be displayed. Shows description about tasks. .PARAMETER DryRun Performs a dry run. -.PARAMETER Experimental -Uses the nightly builds of the Roslyn script engine. -.PARAMETER Mono -Uses the Mono Compiler rather than the Roslyn script engine. .PARAMETER SkipToolPackageRestore Skips restoring of packages. .PARAMETER ScriptArgs @@ -49,13 +45,28 @@ Param( [switch]$ShowDescription, [Alias("WhatIf", "Noop")] [switch]$DryRun, - [switch]$Experimental, - [switch]$Mono, [switch]$SkipToolPackageRestore, [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] [string[]]$ScriptArgs ) +# Attempt to set highest encryption available for SecurityProtocol. +# PowerShell will not set this by default (until maybe .NET 4.6.x). This +# will typically produce a message for PowerShell v2 (just an info +# message though) +try { + # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48) + # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't + # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is + # installed (.NET 4.5 is an in-place upgrade). + # PowerShell Core already has support for TLS 1.2 so we can skip this if running in that. + if (-not $IsCoreCLR) { + [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48 + } + } catch { + Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3' + } + [Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null function MD5HashFile([string] $filePath) { @@ -110,15 +121,16 @@ $MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" # Make sure tools folder exists if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { Write-Verbose -Message "Creating tools directory..." - New-Item -Path $TOOLS_DIR -Type directory | out-null + New-Item -Path $TOOLS_DIR -Type Directory | Out-Null } # Make sure that packages.config exist. if (!(Test-Path $PACKAGES_CONFIG)) { Write-Verbose -Message "Downloading packages.config..." - try { + try { $wc = GetProxyEnabledWebClient - $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { + $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) + } catch { Throw "Could not download packages.config." } } @@ -146,7 +158,12 @@ if (!(Test-Path $NUGET_EXE)) { } # Save nuget.exe path to environment to be available to child processed -$ENV:NUGET_EXE = $NUGET_EXE +$env:NUGET_EXE = $NUGET_EXE +$env:NUGET_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) { + "mono `"$NUGET_EXE`"" +} else { + "`"$NUGET_EXE`"" +} # Restore tools from NuGet? if(-Not $SkipToolPackageRestore.IsPresent) { @@ -154,24 +171,26 @@ if(-Not $SkipToolPackageRestore.IsPresent) { Set-Location $TOOLS_DIR # Check for changes in packages.config and remove installed tools if true. - [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) + [string] $md5Hash = MD5HashFile $PACKAGES_CONFIG if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or - ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { + ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { Write-Verbose -Message "Missing or changed package.config hash..." - Remove-Item * -Recurse -Exclude packages.config,nuget.exe + Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery | + Remove-Item -Recurse } Write-Verbose -Message "Restoring tools from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" + + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet tools." + Throw "An error occurred while restoring NuGet tools." } else { $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" } - Write-Verbose -Message ($NuGetOutput | out-string) + Write-Verbose -Message ($NuGetOutput | Out-String) Pop-Location } @@ -182,13 +201,13 @@ if (Test-Path $ADDINS_PACKAGES_CONFIG) { Set-Location $ADDINS_DIR Write-Verbose -Message "Restoring addins from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet addins." + Throw "An error occurred while restoring NuGet addins." } - Write-Verbose -Message ($NuGetOutput | out-string) + Write-Verbose -Message ($NuGetOutput | Out-String) Pop-Location } @@ -199,13 +218,13 @@ if (Test-Path $MODULES_PACKAGES_CONFIG) { Set-Location $MODULES_DIR Write-Verbose -Message "Restoring modules from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" + $NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet modules." + Throw "An error occurred while restoring NuGet modules." } - Write-Verbose -Message ($NuGetOutput | out-string) + Write-Verbose -Message ($NuGetOutput | Out-String) Pop-Location } @@ -215,6 +234,11 @@ if (!(Test-Path $CAKE_EXE)) { Throw "Could not find Cake.exe at $CAKE_EXE" } +$CAKE_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) { + "mono `"$CAKE_EXE`"" +} else { + "`"$CAKE_EXE`"" +} # Build Cake arguments @@ -224,11 +248,9 @@ if ($Configuration) { $cakeArguments += "-configuration=$Configuration" } if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" } if ($ShowDescription) { $cakeArguments += "-showdescription" } if ($DryRun) { $cakeArguments += "-dryrun" } -if ($Experimental) { $cakeArguments += "-experimental" } -if ($Mono) { $cakeArguments += "-mono" } $cakeArguments += $ScriptArgs # Start Cake Write-Host "Running build script..." -&$CAKE_EXE $cakeArguments +Invoke-Expression "& $CAKE_EXE_INVOCATION $($cakeArguments -join " ")" exit $LASTEXITCODE