From dd40d29f14229f1ef63d1540e87697c92af8a514 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 22 Jun 2019 19:41:14 +0200 Subject: [PATCH] (GH-104) Change to Cake.Recipe --- .gitignore | 161 ++++++++++++++++++++----- build.ps1 | 222 ++++++++++++++++++++++++++++------- build.sh | 95 +++++++++------ nuspec/nuget/Cake.Git.nuspec | 28 +++++ recipe.cake | 26 ++++ tools/packages.config | 3 +- 6 files changed, 424 insertions(+), 111 deletions(-) create mode 100644 nuspec/nuget/Cake.Git.nuspec create mode 100644 recipe.cake diff --git a/.gitignore b/.gitignore index 7f4ebc9..ba4e60c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,28 @@ +# Project specific + +BuildArtifacts/ + +# Created by https://www.gitignore.io/api/cake,visualstudio + +### Cake ### +tools/* +!tools/packages.config + +### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.suo *.user +*.userosscache *.sln.docstates +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -13,20 +30,21 @@ [Rr]eleases/ x64/ x86/ -build/ bld/ [Bb]in/ [Oo]bj/ -.[Vv][Ss]/ +[Ll]og/ -# Roslyn cache directories -*.ide/ +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -#NUNIT +# NUNIT *.VisualState.xml TestResult.xml @@ -35,6 +53,12 @@ TestResult.xml [Rr]eleasePS/ dlldata.c +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + *_i.c *_p.c *_i.h @@ -67,14 +91,18 @@ _Chutzpah* ipch/ *.aps *.ncb +*.opendb *.opensdf *.sdf *.cachefile +*.VC.db +*.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx +*.sap # TFS 2012 Local Workspace $tf/ @@ -87,7 +115,7 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding addin-in +# JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in @@ -96,9 +124,14 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover +# Visual Studio code coverage results +*.coverage +*.coveragexml + # NCrunch _NCrunch_* .*crunch*.local.xml +nCrunchTemp_* # MightyMoose *.mm.* @@ -126,39 +159,64 @@ publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml +# TODO: Uncomment the next line to ignore your web deploy settings. +# By default, sensitive information, such as encrypted password +# should be stored in the .pubxml.user file. +#*.pubxml +*.pubxml.user *.publishproj +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ -# If using the old MSBuild-Integrated Package Restore, uncomment this: +# Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets -# Windows Azure Build Output +# Microsoft Azure Build Output csx/ *.build.csdef -# Windows Store app package directory +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ # Others -sql/ -*.Cache ClientBin/ -[Ss]tyle[Cc]op.* ~$* *~ *.dbmdl *.dbproj.schemaview +*.jfm *.pfx *.publishsettings -node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ # RIA/Silverlight projects Generated_Code/ @@ -174,6 +232,7 @@ UpgradeLog*.htm # SQL Server files *.mdf *.ldf +*.ndf # Business Intelligence projects *.rdl.data @@ -183,18 +242,66 @@ UpgradeLog*.htm # Microsoft Fakes FakesAssemblies/ -#Cake Nuget dir -[Nn]uget/ +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config -#Cake (generated) -[Tt]ools/ +# Telerik's JustMock configuration file +*.jmconfig -# Kudu Local -[Ll]ocal[Dd]eploy/ +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs -# Repo tests -[Tt]est[Rr]epo/ -*.ide +### VisualStudio Patch ### +# By default, sensitive information, such as encrypted password +# should be stored in the .pubxml.user file. -#Cake Artifacts dir -[Aa]rtifacts/ +# End of https://www.gitignore.io/api/cake,visualstudio \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index cf831df..faee428 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,3 +1,9 @@ +########################################################################## +# This is the Cake bootstrapper script for PowerShell. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## + <# .SYNOPSIS @@ -15,87 +21,215 @@ The build script target to run. The build configuration to use. .PARAMETER Verbosity Specifies the amount of information to be displayed. -.PARAMETER WhatIf -Performs a dry run of the build script. -No tasks will be executed. +.PARAMETER ShowDescription +Shows description about tasks. +.PARAMETER DryRun +Performs a dry run. .PARAMETER Experimental -Tells Cake to use the latest Roslyn release. +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 +Remaining arguments are added here. .LINK -http://cakebuild.net +https://cakebuild.net + #> +[CmdletBinding()] Param( - [string]$Script = "build.cake", + [string]$Script = "recipe.cake", [string]$Target = "Default", + [ValidateSet("Release", "Debug")] [string]$Configuration = "Release", [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] [string]$Verbosity = "Verbose", - [Alias("DryRun","Noop")] + [switch]$ShowDescription, + [Alias("WhatIf", "Noop")] + [switch]$DryRun, [switch]$Experimental, - [switch]$WhatIf + [switch]$Mono, + [switch]$SkipToolPackageRestore, + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$ScriptArgs ) -$TOOLS_DIR = Join-Path $PSScriptRoot "tools" -$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" -$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" -$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" +[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null +function MD5HashFile([string] $filePath) +{ + if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) + { + return $null + } + + [System.IO.Stream] $file = $null; + [System.Security.Cryptography.MD5] $md5 = $null; + try + { + $md5 = [System.Security.Cryptography.MD5]::Create() + $file = [System.IO.File]::OpenRead($filePath) + return [System.BitConverter]::ToString($md5.ComputeHash($file)) + } + finally + { + if ($file -ne $null) + { + $file.Dispose() + } + } +} -# Should we use the new Roslyn? -$UseExperimental = ""; -if($Experimental.IsPresent) { - $UseExperimental = "-experimental" +function GetProxyEnabledWebClient +{ + $wc = New-Object System.Net.WebClient + $proxy = [System.Net.WebRequest]::GetSystemWebProxy() + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $wc.Proxy = $proxy + return $wc } -# Is this a dry run? -$UseDryRun = ""; -if($WhatIf.IsPresent) { - $UseDryRun = "-dryrun" +Write-Host "Preparing to run build script..." + +if(!$PSScriptRoot){ + $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } +$TOOLS_DIR = Join-Path $PSScriptRoot "tools" +$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins" +$MODULES_DIR = Join-Path $TOOLS_DIR "Modules" +$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" +$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" +$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" +$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" +$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" +$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" +$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" + # Make sure tools folder exists if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { - New-Item -path $TOOLS_DIR -name logfiles -itemtype directory + Write-Verbose -Message "Creating tools directory..." + New-Item -Path $TOOLS_DIR -Type directory | out-null } -# Try download NuGet.exe if not exists +# Make sure that packages.config exist. +if (!(Test-Path $PACKAGES_CONFIG)) { + Write-Verbose -Message "Downloading packages.config..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { + Throw "Could not download packages.config." + } +} + +# Try find NuGet.exe in path if not exists if (!(Test-Path $NUGET_EXE)) { - Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $NUGET_EXE + Write-Verbose -Message "Trying to find nuget.exe in PATH..." + $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) } + $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 + if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { + Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." + $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName + } } -# Make sure NuGet exists where we expect it. +# Try download NuGet.exe if not exists if (!(Test-Path $NUGET_EXE)) { - Throw "Could not find NuGet.exe" + Write-Verbose -Message "Downloading NuGet.exe..." + try { + $wc = GetProxyEnabledWebClient + $wc.DownloadFile($NUGET_URL, $NUGET_EXE) + } catch { + Throw "Could not download NuGet.exe." + } } # Save nuget.exe path to environment to be available to child processed $ENV:NUGET_EXE = $NUGET_EXE -# Restore tools from NuGet. -Push-Location -Set-Location $TOOLS_DIR - -# Restore packages -if (Test-Path $PACKAGES_CONFIG) -{ - Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion" +# Restore tools from NuGet? +if(-Not $SkipToolPackageRestore.IsPresent) { + Push-Location + Set-Location $TOOLS_DIR + + # Check for changes in packages.config and remove installed tools if true. + [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) + if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or + ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { + Write-Verbose -Message "Missing or changed package.config hash..." + Remove-Item * -Recurse -Exclude packages.config,nuget.exe + } + + Write-Verbose -Message "Restoring tools from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet tools." + } + else + { + $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" + } + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location } -# Install just Cake if missing config -else -{ - Invoke-Expression "&`"$NUGET_EXE`" install Cake -ExcludeVersion" + +# Restore addins from NuGet +if (Test-Path $ADDINS_PACKAGES_CONFIG) { + Push-Location + Set-Location $ADDINS_DIR + + Write-Verbose -Message "Restoring addins from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet addins." + } + + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location } -Pop-Location -if ($LASTEXITCODE -ne 0) -{ - exit $LASTEXITCODE + +# Restore modules from NuGet +if (Test-Path $MODULES_PACKAGES_CONFIG) { + Push-Location + Set-Location $MODULES_DIR + + Write-Verbose -Message "Restoring modules from NuGet..." + $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" + + if ($LASTEXITCODE -ne 0) { + Throw "An error occurred while restoring NuGet modules." + } + + Write-Verbose -Message ($NuGetOutput | out-string) + + Pop-Location } # Make sure that Cake has been installed. if (!(Test-Path $CAKE_EXE)) { - Throw "Could not find Cake.exe" + Throw "Could not find Cake.exe at $CAKE_EXE" } + + +# Build Cake arguments +$cakeArguments = @("$Script"); +if ($Target) { $cakeArguments += "-target=$Target" } +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 -Invoke-Expression "$CAKE_EXE `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseDryRun $UseExperimental" -exit $LASTEXITCODE +Write-Host "Running build script..." +&$CAKE_EXE $cakeArguments +exit $LASTEXITCODE \ No newline at end of file diff --git a/build.sh b/build.sh index 7a329ef..4b690aa 100755 --- a/build.sh +++ b/build.sh @@ -1,35 +1,36 @@ #!/usr/bin/env bash -############################################################### -# This is the Cake bootstrapper script that is responsible for -# downloading Cake and all specified tools from NuGet. -############################################################### +########################################################################## +# This is the Cake bootstrapper script for Linux and OS X. +# This file was downloaded from https://github.com/cake-build/resources +# Feel free to change this file to fit your needs. +########################################################################## # Define directories. SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) TOOLS_DIR=$SCRIPT_DIR/tools NUGET_EXE=$TOOLS_DIR/nuget.exe -CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe +NUGET_URL=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +CAKE_VERSION=0.32.1 +CAKE_EXE=$TOOLS_DIR/Cake.$CAKE_VERSION/Cake.exe + +# Temporarily skip verification of addins. +export CAKE_SETTINGS_SKIPVERIFICATION='true' # Define default arguments. -SCRIPT="build.cake" -TARGET="Travis" +SCRIPT="recipe.cake" +TARGET="Default" CONFIGURATION="Release" VERBOSITY="verbose" DRYRUN= -SHOW_VERSION=false SCRIPT_ARGUMENTS=() -export PATH=$TOOLS_DIR:$PATH - # Parse arguments. for i in "$@"; do case $1 in - -s|--script) SCRIPT="$2"; shift ;; -t|--target) TARGET="$2"; shift ;; -c|--configuration) CONFIGURATION="$2"; shift ;; -v|--verbosity) VERBOSITY="$2"; shift ;; -d|--dryrun) DRYRUN="-dryrun" ;; - --version) SHOW_VERSION=true ;; --) shift; SCRIPT_ARGUMENTS+=("$@"); break ;; *) SCRIPT_ARGUMENTS+=("$1") ;; esac @@ -37,48 +38,66 @@ for i in "$@"; do done # Make sure the tools folder exist. -if [ ! -d $TOOLS_DIR ]; then - mkdir $TOOLS_DIR +if [ ! -d "$TOOLS_DIR" ]; then + mkdir "$TOOLS_DIR" fi -# Make sure that packages.config exist. -if [ ! -f $TOOLS_DIR/packages.config ]; then - echo "Downloading packages.config..." - curl -Lsfo $TOOLS_DIR/packages.config http://cakebuild.net/download/bootstrapper/packages - if [ $? -ne 0 ]; then - echo "An error occured while downloading packages.config." - exit 1 - fi +# Print Mono version. +echo "Mono version:" +mono --version +echo "" + +########################################################################### +# INSTALL .NET CORE CLI +########################################################################### + +echo "Installing .NET CLI..." +if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then + mkdir "$SCRIPT_DIR/.dotnet" fi +curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh +sudo bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 2.1.400 --install-dir .dotnet --no-path +export PATH="$SCRIPT_DIR/.dotnet":$PATH +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 +"$SCRIPT_DIR/.dotnet/dotnet" --info + +########################################################################### +# INSTALL NUGET +########################################################################### # Download NuGet if it does not exist. -if [ ! -f $NUGET_EXE ]; then +if [ ! -f "$NUGET_EXE" ]; then echo "Downloading NuGet..." - curl -Lsfo $NUGET_EXE https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + curl -Lsfo "$NUGET_EXE" $NUGET_URL if [ $? -ne 0 ]; then - echo "An error occured while downloading nuget.exe." + echo "An error occurred while downloading nuget.exe." exit 1 fi fi -# Restore tools from NuGet. -pushd $TOOLS_DIR >/dev/null -mono $NUGET_EXE install -ExcludeVersion -if [ $? -ne 0 ]; then - echo "Could not restore NuGet packages." - exit 1 +########################################################################### +# INSTALL CAKE +########################################################################### + +if [ ! -f "$CAKE_EXE" ]; then + mono "$NUGET_EXE" install Cake -Version $CAKE_VERSION -OutputDirectory "$TOOLS_DIR" + if [ $? -ne 0 ]; then + echo "An error occurred while installing Cake." + exit 1 + fi fi -popd >/dev/null # Make sure that Cake has been installed. -if [ ! -f $CAKE_EXE ]; then +if [ ! -f "$CAKE_EXE" ]; then echo "Could not find Cake.exe at '$CAKE_EXE'." exit 1 fi +########################################################################### +# RUN BUILD SCRIPT +########################################################################### + # Start Cake -if $SHOW_VERSION; then - exec mono $CAKE_EXE -version -else - exec mono $CAKE_EXE $SCRIPT -verbosity=$VERBOSITY -configuration=$CONFIGURATION -target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}" -fi \ No newline at end of file +exec mono "$CAKE_EXE" $SCRIPT --verbosity=$VERBOSITY --configuration=$CONFIGURATION --target=$TARGET $DRYRUN "${SCRIPT_ARGUMENTS[@]}" diff --git a/nuspec/nuget/Cake.Git.nuspec b/nuspec/nuget/Cake.Git.nuspec new file mode 100644 index 0000000..ae5ea56 --- /dev/null +++ b/nuspec/nuget/Cake.Git.nuspec @@ -0,0 +1,28 @@ + + + + Cake.Git + Cake.Git + 0.0.0 + WCOM AB + WCOM AB, cake-contrib + Cake AddIn that extends Cake with Git SCM features + Cake Git AddIn + MIT + https://github.com/cake-contrib/Cake_Git + https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png + false + + Copyright © WCOM AB 2020 + Cake Script Build Git + + + + + + + + + + + \ No newline at end of file diff --git a/recipe.cake b/recipe.cake new file mode 100644 index 0000000..a73d65e --- /dev/null +++ b/recipe.cake @@ -0,0 +1,26 @@ +#load nuget:?package=Cake.Recipe&version=1.1.1 + +Environment.SetVariableNames(); + +BuildParameters.SetParameters( + context: Context, + buildSystem: BuildSystem, + sourceDirectoryPath: "./src", + title: "Cake.Git", + repositoryOwner: "cake-contrib", + repositoryName: "Cake.Git", + appVeyorAccountName: "cakecontrib", + shouldRunDupFinder: false, + shouldRunInspectCode: false); + + +BuildParameters.PrintParameters(Context); + +ToolSettings.SetToolSettings( + context: Context, + dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Git.Tests/*.cs" }, + testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Shouldly]*", + testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", + testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); + +Build.RunDotNetCore(); diff --git a/tools/packages.config b/tools/packages.config index cf77e99..09f891e 100644 --- a/tools/packages.config +++ b/tools/packages.config @@ -1,5 +1,4 @@ - - +