From ffb51dc11eb50824fca7fc71f713cad948029b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Marki=C4=8D?= Date: Thu, 8 Feb 2024 10:57:39 +0100 Subject: [PATCH] (GH-20) Updates build script --- .appveyor.yml | 21 +++++++++++++++++++-- .config/dotnet-tools.json | 2 +- README.md | 21 +++++++++++++++++++-- recipe.cake | 10 +++++----- src/Cake.ProtobufTools.sln | 5 +++-- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index cda557f..4094b45 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,24 @@ #---------------------------------# # Build Image # #---------------------------------# -image: Visual Studio 2019 +image: Visual Studio 2022 + +#---------------------------------# +# Install .NET # +#---------------------------------# +install: + - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" + - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null + - ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" + # Required for Wyam + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 2.1.818 -InstallDir $env:DOTNET_INSTALL_DIR' + # Required for GitVersion + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.411 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.305 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.101 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" + - ps: dotnet --info #---------------------------------# # Build Script # @@ -40,7 +57,7 @@ branches: # Build Cache # #---------------------------------# cache: -- tools -> recipe.cake +- "tools -> recipe.cake" #---------------------------------# # Skip builds for doc changes # diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 727dfd7..4903ba5 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "0.38.5", + "version": "1.3.0", "commands": [ "dotnet-cake" ] diff --git a/README.md b/README.md index 5a7a952..daa62f5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,18 @@ A Cake AddIn that extends Cake with [Google.Protofbuf.Tools](https://github.com/ [![cakebuild.net](https://img.shields.io/badge/WWW-cakebuild.net-blue.svg)](http://cakebuild.net/) [![NuGet](https://img.shields.io/nuget/v/Cake.ProtobufTools.svg)](https://www.nuget.org/packages/Cake.ProtobufTools) -[![Build status](https://ci.appveyor.com/api/projects/status/hy5nkbl0bh8emv1e?svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-protobuftools) + +|Branch|Status| +|------|------| +|Master|[![Build status](https://ci.appveyor.com/api/projects/status/github/cake-contrib/Cake.ProtobufTools?branch=master&svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-protobuftools)| +|Develop|[![Build status](https://ci.appveyor.com/api/projects/status/github/cake-contrib/Cake.ProtobufTools?branch=develop&svg=true)](https://ci.appveyor.com/project/cakecontrib/cake-protobuftools)| + +## Important + +1.5.0 +* References Cake 4.0.0 +* Drops support for .NET Framework +* Supports .net 6+ ## Including addin Including addin in cake script is easy. @@ -49,8 +60,14 @@ var settings = new ProtocSettings }; ``` +## Discussion +If you have questions, search for an existing one, or create a new discussion on the Cake GitHub repository, using the `extension-q-a` category. + +[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions/categories/extension-q-a) ## Credits -Brought to you by [Miha Markic](https://github.com/MihaMarkic) ([@MihaMarkic](https://twitter.com/MihaMarkic/)) and contributors. +Brought to you by [Miha Markic](https://github.com/MihaMarkic) and contributors. + +![Mastodon Follow](https://img.shields.io/mastodon/follow/001030236) \ No newline at end of file diff --git a/recipe.cake b/recipe.cake index 5090754..7c89b06 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,25 +1,25 @@ -#load nuget:?package=Cake.Recipe&version=2.2.0 +#load nuget:?package=Cake.Recipe&version=3.1.1 Environment.SetVariableNames(); BuildParameters.SetParameters( - context: Context, + context: Context, buildSystem: BuildSystem, sourceDirectoryPath: "./src", title: "Cake.ProtobufTools", repositoryOwner: "cake-contrib", repositoryName: "Cake.ProtobufTools", appVeyorAccountName: "cakecontrib", - shouldRunDupFinder: false, + shouldPostToGitter: false, shouldRunInspectCode: false, shouldRunCodecov: false, - shouldRunDotNetCorePack: true); + shouldRunDotNetCorePack: true, + shouldRunCoveralls: false); // Disabled because it's currently failing BuildParameters.PrintParameters(Context); ToolSettings.SetToolSettings( context: Context, - dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.ProtobufTools.Tests/*.cs" }, testCoverageFilter: "+[*]* -[nunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]*", testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); diff --git a/src/Cake.ProtobufTools.sln b/src/Cake.ProtobufTools.sln index fbb6ce4..1433f81 100644 --- a/src/Cake.ProtobufTools.sln +++ b/src/Cake.ProtobufTools.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31105.61 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34525.116 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cake.ProtobufTools", "Cake.ProtobufTools\Cake.ProtobufTools.csproj", "{CE9145B9-3226-4F87-BD02-392820D8D999}" EndProject @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{CAEE09AF-1 ProjectSection(SolutionItems) = preProject ..\.appveyor.yml = ..\.appveyor.yml ..\.gitignore = ..\.gitignore + ..\build.ps1 = ..\build.ps1 ..\GitReleaseManager.yaml = ..\GitReleaseManager.yaml ..\README.md = ..\README.md ..\recipe.cake = ..\recipe.cake