Skip to content

Commit

Permalink
Update Cake.Args to target Cake v3.0.0 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete authored Nov 9, 2022
1 parent c282365 commit 9e1812c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 33 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/[email protected]
with:
dotnet-version: "3.1.413"
- name: Setup net5.0
- name: Setup net6.0
uses: actions/[email protected]
with:
dotnet-version: "5.0.401"
- name: Setup net6.0
dotnet-version: "6.0.403"
- name: Setup net7.0
uses: actions/[email protected]
with:
dotnet-version: "6.0.100"
dotnet-version: "7.0.100"
- name: Run dotnet --info
run: dotnet --info
- uses: actions/[email protected]
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) 2021 C. Augusto Proiete & Contributors
Copyright (c) 2021-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
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h1 align="center">Cake.Args</h1>
<div align="center">

Cross-platform addin for the [Cake](https://cakebuild.net) build automation system that adds Arguments extensions in Cake build scripts. Cake.Args targets .NET 5.0, .NET Standard 2.0 and .NET Framework 4.6.1.
Cross-platform addin for the [Cake](https://cakebuild.net) build automation system that adds Arguments extensions in Cake build scripts. The latest version of Cake.Args targets .NET 7.0, and .NET 6.0.

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

Expand All @@ -25,15 +25,15 @@ If you like or are using this project please give it a star. Thanks!
Simply add `Cake.Args` in your build script by using the [`addin`](http://cakebuild.net/docs/writing-builds/preprocessor-directives#add-in-directive) directive:

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

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

And you're ready to use the arguments extensions in your Cake build script:

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

var configuration =
ArgumentOrDefault<string>("configuration") ??
Expand All @@ -47,7 +47,7 @@ var majorVersion =
Task("Example")
.Does(context =>
{
var settings = new DotNetCoreBuildSettings
var settings = new DotNetBuildSettings
{
Configuration = configuration,
};
Expand All @@ -57,7 +57,7 @@ Task("Example")
settings.VersionSuffix = $"{majorVersion}.0.0";
}

DotNetCoreBuild("./MyProject.sln", settings);
DotNetBuild("./MyProject.sln", settings);
});

RunTarget("Example");
Expand All @@ -75,7 +75,8 @@ Cake.Args is compatible with all [Cake runners](https://cakebuild.net/docs/runni

| Cake runner | Cake.Args | Cake addin directive |
|:---------------:|:---------------:| ------------------------------------------------- |
| 2.0.0 or higher | 2.0.0 or higher | `#addin "nuget:?package=Cake.Args&version=2.0.0"` |
| 3.0.0 or higher | 3.0.0 or higher | `#addin "nuget:?package=Cake.Args&version=3.0.0"` |
| 2.0.0 | 2.0.0 - 2.3.0 | `#addin "nuget:?package=Cake.Args&version=2.0.0"` |
| 1.0.0 - 1.3.0 | 1.0.0 - 1.0.1 | `#addin "nuget:?package=Cake.Args&version=1.0.1"` |
| 0.33.0 - 0.38.5 | 0.1.0 | `#addin "nuget:?package=Cake.Args&version=0.1.0"` |
| < 0.33.0 | _N/A_ | _(not supported)_ |
Expand Down Expand Up @@ -109,4 +110,4 @@ Click on the [Releases](https://github.com/augustoproiete/Cake.Args/releases) ta

---

_Copyright &copy; 2021 C. Augusto Proiete & Contributors - Provided under the [MIT License](LICENSE)._
_Copyright &copy; 2021-2022 C. Augusto Proiete & Contributors - Provided under the [MIT License](LICENSE)._
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.Args/Cake.Args.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.Args</RootNamespace>

<AssemblyName>Cake.Args</AssemblyName>
Expand All @@ -28,7 +28,7 @@
<Authors>C. Augusto Proiete &amp; Contributors</Authors>
<Company>augustoproiete.net</Company>
<Description>Cake addin that provides additional Arguments extensions in Cake build scripts.</Description>
<Copyright>Copyright 2021 C. Augusto Proiete &amp; Contributors - Provided under the MIT License</Copyright>
<Copyright>Copyright 2021-2022 C. Augusto Proiete &amp; Contributors - Provided under the MIT License</Copyright>
<PackageTags>cake;args;cake-addin;cake-build;addin;script;build;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.Args.Tests/Cake.Args.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 9e1812c

Please sign in to comment.