Skip to content

Commit

Permalink
Bump to Cake 4.0.0 (#59)
Browse files Browse the repository at this point in the history
* Bump version to follow cake convention

* Bump nuget packages and tools to latest

* Update gitignore with Rider exclusions

* Multi-target net8.0 as latest

* Make debug symbols embedded in the DLL

We're not shipping this in user projects so a little more size shouldn't matter

* Make project build deterministic

* Add readme file to the nuget package to follow standards

* Update github action build to use both net6.0 and net8.0
  • Loading branch information
Romanx authored Mar 9, 2024
1 parent 7dcf4cc commit e332aed
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 22 deletions.
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": "3.0.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,25 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
8.0.x
- name: Nerdbank.GitVersioning
uses: dotnet/nbgv@v0.4.0
with:
setAllVars: true

- name: Run the build script
uses: cake-build/cake-action@v1
with:
target: Pack
cake-version: tool-manifest

- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.0
if: runner.os == 'Windows'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: |
6.0.x
8.0.x
- name: Nerdbank.GitVersioning
uses: dotnet/nbgv@v0.4.0
Expand Down
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,89 @@ FakesAssemblies/

*.DotSettings

### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# End of https://www.toptal.com/developers/gitignore/api/rider

BenchmarkDotNet.Artifacts/
tools/*
coverage-results/*
Expand Down
1 change: 1 addition & 0 deletions Cake.Coverlet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.cake = build.cake
readme.md = readme.md
version.json = version.json
.gitignore = .gitignore
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EEC95ADF-2D7A-4B97-9D4E-27F2F198FFC6}"
Expand Down
18 changes: 12 additions & 6 deletions src/Cake.Coverlet/Cake.Coverlet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Coverlet extensions for Cake Build</Description>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Cake.Coverlet</AssemblyName>
<PackageId>Cake.Coverlet</PackageId>
Expand All @@ -16,11 +16,12 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/romanx/Cake.Coverlet</PackageProjectUrl>
<PackageLicenseFile>licence.md</PackageLicenseFile>
<PackageIcon>images\icon.png</PackageIcon>
<PackageIconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/addin/cake-contrib-addin-medium.png</PackageIconUrl>
<DebugType>portable</DebugType>
<DebugType>embedded</DebugType>
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>

Expand All @@ -31,18 +32,23 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Common" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Common" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Addin.Analyzer" Version="0.1.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.109" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\licence.md" Pack="true" PackagePath="" />
<None Include="..\..\licence.md" Pack="true" PackagePath="\" />
<None Include="..\..\readme.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
Expand Down
26 changes: 13 additions & 13 deletions test/Cake.Coverlet.Tests/Cake.Coverlet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Common" Version="3.0.0" />
<PackageReference Include="Cake.Testing" Version="3.0.0" />
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Cake.Common" Version="4.0.0" />
<PackageReference Include="Cake.Testing" Version="4.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.109">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.0",
"version": "4.0",
"publicReleaseRefSpec": [
"^refs/tags/v\\d\\.\\d", // we also release tags starting with vN.N
"^refs/heads/main$"
Expand Down

0 comments on commit e332aed

Please sign in to comment.