Skip to content

Commit

Permalink
Update Cake.MinVer to target Cake v3.0.0 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete authored Nov 10, 2022
1 parent 0c070ca commit 2ae8cd6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 30 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,24 @@ jobs:
fail-fast: false
matrix:
job:
- os: ubuntu-18.04
build: ./build.sh
- os: ubuntu-20.04
- os: ubuntu-22.04
build: ./build.sh
push: true
- os: windows-2019
build: ./build.cmd
- os: windows-2022
build: ./build.cmd
- os: macos-10.15
build: ./build.sh
- os: macos-11
- os: macos-12
build: ./build.sh
name: ${{ matrix.job.os }}
runs-on: ${{ matrix.job.os }}
steps:
- name: Setup netcoreapp3.1
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: "3.1.413"
- name: Setup net5.0
- name: Setup net6.0
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: "5.0.401"
- name: Setup net6.0
dotnet-version: "6.0.403"
- name: Setup net7.0
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: "6.0.100"
dotnet-version: "7.0.100"
- name: Run dotnet --info
run: dotnet --info
- uses: actions/checkout@v3.1.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 C. Augusto Proiete & Contributors
Copyright (c) 2020-2022 C. Augusto Proiete & Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h1 align="center">Cake.MinVer</h1>
<div align="center">

Cross-platform addin for the [Cake](https://cakebuild.net) build automation system that enables you to use [MinVer](https://github.com/adamralph/minver) for versioning projects using Git tags. Cake.MinVer targets the .NET Standard 2.0 and runs on Windows, Linux, and macOS.
Cross-platform addin for the [Cake](https://cakebuild.net) build automation system that enables you to use [MinVer](https://github.com/adamralph/minver) for versioning projects using Git tags. The latest version of Cake.MinVer targets .NET 7.0 and .NET 6.0, and runs on Windows, Linux, and macOS.

[![NuGet Version](https://img.shields.io/nuget/v/Cake.MinVer.svg?color=blue&style=flat-square)](https://www.nuget.org/packages/Cake.MinVer/) [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-cakebuild-orange.svg?style=flat-square)](http://stackoverflow.com/questions/tagged/cakebuild)

Expand All @@ -31,15 +31,15 @@ This addin exposes the functionality of [MinVer](https://github.com/adamralph/mi
First of all, you need to import Cake.MinVer in your build script by using the [`addin`](http://cakebuild.net/docs/fundamentals/preprocessor-directives) directive:

```csharp
#addin "nuget:?package=Cake.MinVer&version=2.0.0"
#addin "nuget:?package=Cake.MinVer&version=3.0.0"
```

_Make sure the `&version=` attribute references the [latest version of Cake.MinVer](https://www.nuget.org/packages/Cake.MinVer/) compatible with the Cake runner that you are using. Check the [compatibility table](#compatibility) to see which version of Cake.MinVer to choose_.

Next, call `MinVer()` in order to get the version information using the default settings:

```csharp
#addin "nuget:?package=Cake.MinVer&version=2.0.0"
#addin "nuget:?package=Cake.MinVer&version=3.0.0"

var version = MinVer();

Expand Down Expand Up @@ -173,7 +173,8 @@ Cake.MinVer is compatible with all [Cake runners](https://cakebuild.net/docs/run

| Cake runner | Cake.MinVer | Cake addin directive |
|:---------------:|:-----------------:| --------------------------------------------------- |
| 2.0.0 or higher | 2.0.0 or higher | `#addin "nuget:?package=Cake.MinVer&version=2.0.0"` |
| 3.0.0 or higher | 3.0.0 or higher | `#addin "nuget:?package=Cake.MinVer&version=3.0.0"` |
| 2.0.0 - 2.3.0 | 2.0.0 | `#addin "nuget:?package=Cake.MinVer&version=2.0.0"` |
| 1.0.0 - 1.3.0 | 1.0.0 - 1.0.1 | `#addin "nuget:?package=Cake.MinVer&version=1.0.1"` |
| 0.33.0 - 0.38.5 | 0.2.0 | `#addin "nuget:?package=Cake.MinVer&version=0.2.0"` |
| < 0.33.0 | _N/A_ | _(not supported)_ |
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"allowPrerelease": false,
"version": "6.0.100",
"version": "7.0.100",
"rollForward": "latestFeature"
}
}
8 changes: 4 additions & 4 deletions src/Cake.MinVer/Cake.MinVer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<RootNamespace>Cake.MinVer</RootNamespace>

<AssemblyName>Cake.MinVer</AssemblyName>
Expand All @@ -28,7 +28,7 @@
<Authors>C. Augusto Proiete &amp; Contributors</Authors>
<Company>augustoproiete.net</Company>
<Description>Cake add-in that makes MinVer available as a tool in Cake.</Description>
<Copyright>Copyright 2020-2021 C. Augusto Proiete &amp; Contributors - Provided under the MIT License</Copyright>
<Copyright>Copyright 2020-2022 C. Augusto Proiete &amp; Contributors - Provided under the MIT License</Copyright>
<PackageTags>cake;minver;cake-addin;cake-build;cake-contrib;addin;script;build;cake-contrib;augustoproiete;augusto-proiete</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>images\icon.png</PackageIcon>
Expand All @@ -40,8 +40,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Common" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Core" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Common" Version="3.0.0" PrivateAssets="All" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions test/Cake.MinVer.Tests/Cake.MinVer.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="2.0.0" />
<PackageReference Include="Cake.Common" Version="2.0.0" />
<PackageReference Include="Cake.Testing" Version="2.0.0" />
<PackageReference Include="Cake.Core" Version="3.0.0" />
<PackageReference Include="Cake.Common" Version="3.0.0" />
<PackageReference Include="Cake.Testing" Version="3.0.0" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.9.1" />
Expand Down

0 comments on commit 2ae8cd6

Please sign in to comment.