From 7bced25cd0d6f305d4384da6e335520aa19d02a3 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Mon, 7 Aug 2023 22:41:57 +0200 Subject: [PATCH] Update to Cake.Recipe 3 --- .appveyor.yml | 2 +- build.ps1 | 14 +++++++------- build.sh | 2 +- recipe.cake | 7 +++---- tools/packages.config | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0d21fc4..53daf1e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,7 +7,7 @@ image: Visual Studio 2017 # Build Script # #---------------------------------# build_script: - - ps: .\build.ps1 -Target AppVeyor + - ps: .\build.ps1 --target=CI # Tests test: off diff --git a/build.ps1 b/build.ps1 index 8a28de1..4c893f4 100644 --- a/build.ps1 +++ b/build.ps1 @@ -220,13 +220,13 @@ if (!(Test-Path $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" } +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 diff --git a/build.sh b/build.sh index 4b690aa..8380bf3 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ for i in "$@"; do -t|--target) TARGET="$2"; shift ;; -c|--configuration) CONFIGURATION="$2"; shift ;; -v|--verbosity) VERBOSITY="$2"; shift ;; - -d|--dryrun) DRYRUN="-dryrun" ;; + -d|--dryrun) DRYRUN="--dryrun" ;; --) shift; SCRIPT_ARGUMENTS+=("$@"); break ;; *) SCRIPT_ARGUMENTS+=("$1") ;; esac diff --git a/recipe.cake b/recipe.cake index d518be6..47b811f 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,4 @@ -#load nuget:?package=Cake.Recipe&version=1.0.0 +#load nuget:?package=Cake.Recipe&version=3.0.1 Environment.SetVariableNames(); @@ -10,14 +10,13 @@ BuildParameters.SetParameters( repositoryOwner: "cake-contrib", repositoryName: "Cake.Markdownlint", appVeyorAccountName: "cakecontrib", - shouldRunGitVersion: true, - shouldRunCodecov: false); + shouldRunCoveralls: false, // Disabled because it's currently failing + shouldPostToGitter: false); // Disabled because it's currently failing BuildParameters.PrintParameters(Context); ToolSettings.SetToolSettings( context: Context, - dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Markdownlint.Tests/*.cs" }, testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Shouldly]* -[DiffEngine]* -[EmptyFiles]*", testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); diff --git a/tools/packages.config b/tools/packages.config index 997c0e1..0ae6f9a 100644 --- a/tools/packages.config +++ b/tools/packages.config @@ -1,4 +1,4 @@ - +