Skip to content

Commit

Permalink
(GH-20) Updates build script
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaMarkic committed Feb 8, 2024
1 parent fbecf72 commit ffb51dc
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
21 changes: 19 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -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 #
Expand Down Expand Up @@ -40,7 +57,7 @@ branches:
# Build Cache #
#---------------------------------#
cache:
- tools -> recipe.cake
- "tools -> recipe.cake"

#---------------------------------#
# Skip builds for doc changes #
Expand Down
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.5",
"version": "1.3.0",
"commands": [
"dotnet-cake"
]
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
10 changes: 5 additions & 5 deletions recipe.cake
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
5 changes: 3 additions & 2 deletions src/Cake.ProtobufTools.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

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
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{CAEE09AF-15F7-4AD1-952A-504DC02C00A8}"
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
Expand Down

0 comments on commit ffb51dc

Please sign in to comment.