diff --git a/src/.paket/Paket.Restore.targets b/src/.paket/Paket.Restore.targets index 4deb15bc..bbeec153 100644 --- a/src/.paket/Paket.Restore.targets +++ b/src/.paket/Paket.Restore.targets @@ -1,322 +1,325 @@ - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - $(MSBuildVersion) - 15.0.0 - false - true - - true - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\ - $(PaketRootPath)paket-files\paket.restore.cached - $(PaketRootPath)paket.lock - classic - proj - assembly - native - /Library/Frameworks/Mono.framework/Commands/mono - mono + $(MSBuildVersion) + 15.0.0 + false + true + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket-files\paket.restore.cached + $(PaketRootPath)paket.lock + classic + proj + assembly + native + /Library/Frameworks/Mono.framework/Commands/mono + mono - - $(PaketRootPath)paket.bootstrapper.exe - $(PaketToolsPath)paket.bootstrapper.exe - $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ - "$(PaketBootStrapperExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" - - - - true - true + + + + true + true - - True + + True - - False + + False - $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + - - - - - - - $(PaketRootPath)paket - $(PaketToolsPath)paket - + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + - - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + - - - - <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) - <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) - <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false - + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + - - - - - + + + + + - - - <_PaketCommand>dotnet paket - + + + <_PaketCommand>dotnet paket + - - - - $(PaketToolsPath)paket - $(PaketBootStrapperExeDir)paket + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket - - paket - + + paket + - - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" - + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + - - - - + + + + - + - - - + + + - - - - + + + + - - - true - $(NoWarn);NU1603;NU1604;NU1605;NU1608 - false - true - + + + true + $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true + - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - - - - - - - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) - - - - - %(PaketRestoreCachedKeyValue.Value) - %(PaketRestoreCachedKeyValue.Value) - + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) + - - - true - false - true - + + + true + false + true + - - - true - + + true + - - - - - - + + + + + + - - - - - - - + + + + + + + - - $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached - - $(MSBuildProjectFullPath).paket.references - - $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references - - $(MSBuildProjectDirectory)\paket.references + + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached + + $(MSBuildProjectFullPath).paket.references + + $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references + + $(MSBuildProjectDirectory)\paket.references - false - true - true - references-file-or-cache-not-found - + false + true + true + references-file-or-cache-not-found + - - - $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) - $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) - references-file - false - + + + $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) + $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) + references-file + false + - - - false - + + + false + - - - true - target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) - + + + true + target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) + - - - - - + + + + + - - - false - true - - + + + false + true + + - - - - + + + + - - - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) - - - %(PaketReferencesFileLinesInfo.PackageVersion) - All - runtime - $(ExcludeAssets);contentFiles - $(ExcludeAssets);build;buildMultitargeting;buildTransitive - true - true - - + + + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8]) + + + %(PaketReferencesFileLinesInfo.PackageVersion) + All + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive + %(PaketReferencesFileLinesInfo.Aliases) + true + true - - $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools - + + - - - + + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools + - - - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) - - - %(PaketCliToolFileLinesInfo.PackageVersion) - - + + + - - + - - - false - - + + + false + + - - - <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> - - - + + + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> + + + - - $(MSBuildProjectDirectory)/$(MSBuildProjectFile) - true - false - true - false - true - false - true - false - true - false - true - $(PaketIntermediateOutputPath)\$(Configuration) - $(PaketIntermediateOutputPath) - + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) + true + false + true + false + true + false + true + false + true + false + true + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) + - - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - + + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> + - - - + + + - - - + + + - + - + - + - - - + + + diff --git a/src/build.cake b/src/build.cake index 373c0dfe..a7439978 100644 --- a/src/build.cake +++ b/src/build.cake @@ -267,14 +267,14 @@ Task("Run-Unit-Tests").Description("Run the unit tests") Information("Upload coverage to AppVeyor..."); BuildSystem.AppVeyor.UploadArtifact(coverageFile); } - if(BuildSystem.IsRunningOnVSTS) + if(BuildSystem.IsRunningOnAzurePipelinesHosted) { Information("Upload coverage to VSTS..."); - BuildSystem.TFBuild.Commands.UploadArtifact("reports", coverageFile, "coverage.xml"); + BuildSystem.AzurePipelines.Commands.UploadArtifact("reports", coverageFile, "coverage.xml"); } var coverageResultFolder = System.IO.Path.Combine(buildAssetPath, "coverage"); - ReportGenerator(coverageFile, coverageResultFolder, new ReportGeneratorSettings(){ + ReportGenerator(new FilePath(coverageFile), coverageResultFolder, new ReportGeneratorSettings(){ ToolPath = @".\packages\build\ReportGenerator\tools\net47\ReportGenerator.exe" }); if(!BuildSystem.IsLocalBuild) @@ -286,10 +286,10 @@ Task("Run-Unit-Tests").Description("Run the unit tests") Information("Upload coverage zipped to AppVeyor..."); BuildSystem.AppVeyor.UploadArtifact(coverageZip); } - if(BuildSystem.IsRunningOnVSTS) + if(BuildSystem.IsRunningOnAzurePipelinesHosted) { Information("Upload coverage zipped to VSTS..."); - BuildSystem.TFBuild.Commands.UploadArtifact("reports", coverageZip, "coverage.zip"); + BuildSystem.AzurePipelines.Commands.UploadArtifact("reports", coverageZip, "coverage.zip"); } } }); @@ -343,10 +343,10 @@ Task("Package").Description("Generate the release zip file") Information("Upload artifacts to AppVeyor..."); BuildSystem.AppVeyor.UploadArtifact(_zipFilePath); } - if(BuildSystem.IsRunningOnVSTS) + if(BuildSystem.IsRunningOnAzurePipelinesHosted) { Information("Upload artifacts to VSTS..."); - BuildSystem.TFBuild.Commands.UploadArtifact("install", _zipFilePath, _zipFilename); + BuildSystem.AzurePipelines.Commands.UploadArtifact("install", _zipFilePath, _zipFilename); } } }); @@ -608,10 +608,10 @@ Task("Chocolatey").Description("Generate the chocolatey package") Information("Uploading chocolatey package as AppVeyor artifact..."); BuildSystem.AppVeyor.UploadArtifact(chocolateyPackagePath); } - if(BuildSystem.IsRunningOnVSTS) + if(BuildSystem.IsRunningOnAzurePipelinesHosted) { Information("Uploading chocolatey package as VSTS artifact..."); - BuildSystem.TFBuild.Commands.UploadArtifact("install", chocolateyPackagePath, chocolateyPackage); + BuildSystem.AzurePipelines.Commands.UploadArtifact("install", chocolateyPackagePath, chocolateyPackage); } if(!runInDryRun) diff --git a/src/build.ps1 b/src/build.ps1 index 1f69d855..eacf4574 100644 --- a/src/build.ps1 +++ b/src/build.ps1 @@ -52,20 +52,6 @@ $PAKET_EXE = Join-Path $PSScriptRoot "paket.exe" $TOOLS_DIR = Join-Path $PSScriptRoot "packages/build" $CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" -# Should we use mono? -$UseMono = ""; -if($Mono.IsPresent) { - Write-Verbose -Message "Using the Mono based scripting engine." - $UseMono = "-mono" -} - -# Should we use the new Roslyn? -$UseExperimental = ""; -if($Experimental.IsPresent -and !($Mono.IsPresent)) { - Write-Verbose -Message "Using experimental version of Roslyn." - $UseExperimental = "-experimental" -} - # Is this a dry run? $UseDryRun = ""; if($WhatIf.IsPresent) { @@ -92,5 +78,5 @@ if (!(Test-Path $CAKE_EXE)) { # Start Cake Write-Host "Running build script..." -Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" --paths_tools=`"$TOOLS_DIR`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs" +Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" --paths_tools=`"$TOOLS_DIR`" --target=`"$Target`" --configuration=`"$Configuration`" --verbosity=`"$Verbosity`" $UseDryRun $UseExperimental $ScriptArgs" exit $LASTEXITCODE \ No newline at end of file diff --git a/src/paket.dependencies b/src/paket.dependencies index 666b9cd7..de1be3b0 100644 --- a/src/paket.dependencies +++ b/src/paket.dependencies @@ -21,13 +21,13 @@ group Build redirects: off source https://api.nuget.org/v3/index.json -nuget Cake -nuget Cake.Git +nuget Cake ~> 1.3.0 +nuget Cake.Git ~> 1.1.0 nuget GitVersion.CommandLine nuget Octokit.CodeFormatter 1.0.0-preview preview nuget opencover nuget reportgenerator -nuget Octokit +nuget Octokit ~> 0.52 nuget xunit.runner.console diff --git a/src/paket.lock b/src/paket.lock index 6e0feddc..9348ecec 100644 --- a/src/paket.lock +++ b/src/paket.lock @@ -35,10 +35,10 @@ GROUP Build REDIRECTS: OFF NUGET remote: https://api.nuget.org/v3/index.json - Cake (0.38.5) - Cake.Git (0.22) + Cake (1.3) + Cake.Git (1.1) GitVersion.CommandLine (5.5) - Octokit (0.48) + Octokit (0.52) Octokit.CodeFormatter (1.0.0-preview) OpenCover (4.7.922) ReportGenerator (4.7.1)