Skip to content

Commit dcba652

Browse files
committed
feat(dotnet): add support for NET6 and upgrade cake tools and 1password cli
1 parent 2d9026a commit dcba652

File tree

22 files changed

+97
-55
lines changed

22 files changed

+97
-55
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
with:
6565
dotnet-version: 5.0.100
6666

67+
- name: Setup .NET 6.x
68+
uses: actions/setup-dotnet@v1
69+
with:
70+
dotnet-version: 6.0.100
71+
6772
- name: Integration Tests
6873
shell: bash
6974
run: |
@@ -110,6 +115,11 @@ jobs:
110115
with:
111116
dotnet-version: 5.0.100
112117

118+
- name: Setup .NET 6.x
119+
uses: actions/setup-dotnet@v1
120+
with:
121+
dotnet-version: 6.0.100
122+
113123
- name: Integration Tests
114124
shell: bash
115125
run: |

.github/workflows/publish.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
with:
4343
dotnet-version: 5.0.100
4444

45+
- name: Setup .NET 6.x
46+
uses: actions/setup-dotnet@v1
47+
with:
48+
dotnet-version: 6.0.100
49+
4550
- name: Docker Hub login
4651
uses: docker/login-action@v1
4752
with:

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
## What is Appy.Configuration?
66

7-
Configuration providers for NETCore 2.2, 3.0, 3.1 and NET 5.0.
7+
Configuration providers for NETCore 3.1, NET 5.0 and NET6.0.
88

99
## Configuration Providers
1010

1111
| Package | Latest Stable |
1212
| --- | --- |
13-
| [Appy.Configuration.1Password](https://www.nuget.org/packages/Appy.Configuration.1Password) | [![Nuget Package](https://img.shields.io/badge/nuget-0.8.0-blue.svg)](https://www.nuget.org/packages/Appy.Configuration.1Password) |
14-
| [appy-op](https://www.nuget.org/packages/appy-op) | [![Nuget Package](https://img.shields.io/badge/nuget-0.8.0-blue.svg)](https://www.nuget.org/packages/appy-op)
15-
| [appy-op (Docker Image)](https://hub.docker.com/r/appyway/appy-op/tags?page=1&ordering=last_updated) | [![Docker Image](https://img.shields.io/badge/docker-0.8.0-blue.svg)](https://hub.docker.com/r/appyway/appy-op/tags?page=1&ordering=last_updated) |
16-
| [Appy.Configuration.WinRegistry](https://www.nuget.org/packages/Appy.Configuration.WinRegistry) | [![Nuget Package](https://img.shields.io/badge/nuget-0.8.0-blue.svg)](https://www.nuget.org/packages/Appy.Configuration.WinRegistry) |
13+
| [Appy.Configuration.1Password](https://www.nuget.org/packages/Appy.Configuration.1Password) | [![Nuget Package](https://img.shields.io/badge/nuget-0.9.0-blue.svg)](https://www.nuget.org/packages/Appy.Configuration.1Password) |
14+
| [appy-op](https://www.nuget.org/packages/appy-op) | [![Nuget Package](https://img.shields.io/badge/nuget-0.9.0-blue.svg)](https://www.nuget.org/packages/appy-op)
15+
| [appy-op (Docker Image)](https://hub.docker.com/r/appyway/appy-op/tags?page=1&ordering=last_updated) | [![Docker Image](https://img.shields.io/badge/docker-0.9.0-blue.svg)](https://hub.docker.com/r/appyway/appy-op/tags?page=1&ordering=last_updated) |
16+
| [Appy.Configuration.WinRegistry](https://www.nuget.org/packages/Appy.Configuration.WinRegistry) | [![Nuget Package](https://img.shields.io/badge/nuget-0.9.0-blue.svg)](https://www.nuget.org/packages/Appy.Configuration.WinRegistry) |
1717

1818
## Table of Contents
1919

@@ -50,7 +50,7 @@ PM> Install-Package Appy.Configuration.1Password
5050
When you install the package, it should be added to your _csproj_ file. Alternatively, you can add it directly by adding:
5151

5252
```xml
53-
<PackageReference Include="Appy.Configuration.1Password" Version="0.8.0" />
53+
<PackageReference Include="Appy.Configuration.1Password" Version="0.9.0" />
5454
```
5555

5656
Let's imagine we have a configuration file like the following appsettings.json file:
@@ -344,7 +344,7 @@ PM> Install-Package Appy.Configuration.WinRegistry
344344
When you install the package, it should be added to your _csproj_ file. Alternatively, you can add it directly by adding:
345345

346346
```xml
347-
<PackageReference Include="Appy.Configuration.WinRegistry" Version="0.8.0" />
347+
<PackageReference Include="Appy.Configuration.WinRegistry" Version="0.9.0" />
348348
```
349349

350350
Now let's imagine we have a configuration file like the following appSettings.json:

build.cake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Task("Clean")
3939
Task("Restore")
4040
.Does(() =>
4141
{
42-
DotNetCoreRestore(basePath,
43-
new DotNetCoreRestoreSettings
42+
DotNetRestore(basePath,
43+
new DotNetRestoreSettings
4444
{
4545
Verbosity = DotNetCoreVerbosity.Minimal
4646
});
@@ -56,7 +56,7 @@ Task("Build-Project")
5656

5757
var projectFilePath = projectDescriptor.Document.ProjectFileFullPath;
5858

59-
DotNetCoreBuild(projectFilePath, new DotNetCoreBuildSettings {
59+
DotNetBuild(projectFilePath, new DotNetBuildSettings {
6060
Configuration = configuration,
6161
NoRestore = true,
6262
NoIncremental = context.HasArgument("rebuild"),
@@ -103,7 +103,7 @@ Task("Test")
103103

104104
var projectFilePath = projectDescriptor.Document.ProjectFileFullPath;
105105

106-
DotNetCoreTest(projectFilePath, new DotNetCoreTestSettings {
106+
DotNetTest(projectFilePath, new DotNetTestSettings {
107107
Configuration = configuration,
108108
NoRestore = true,
109109
NoBuild = true,
@@ -127,7 +127,7 @@ Task("Package")
127127

128128
var projectFilePath = projectDescriptor.Document.ProjectFileFullPath;
129129

130-
context.DotNetCorePack(projectFilePath, new DotNetCorePackSettings {
130+
context.DotNetPack(projectFilePath, new DotNetPackSettings {
131131
Configuration = configuration,
132132
NoRestore = true,
133133
NoBuild = true,
@@ -191,10 +191,10 @@ Task("Publish-Package-NuGet")
191191

192192
context.Information("Publishing {0} to Nuget", nugetPkgFilePath);
193193

194-
DotNetCoreNuGetPush(nugetPkgFilePath, new DotNetCoreNuGetPushSettings
194+
DotNetNuGetPush(nugetPkgFilePath, new DotNetNuGetPushSettings
195195
{
196196
Source = "https://api.nuget.org/v3/index.json",
197-
ApiKey = apiKey,
197+
ApiKey = apiKey
198198
});
199199
}
200200
});
@@ -233,7 +233,7 @@ Task("Publish-Docker-DockerHub")
233233
// Targets
234234

235235
Task("Publish")
236-
.IsDependentOn("Publish-Package-GitHub")
236+
// .IsDependentOn("Publish-Package-GitHub")
237237
.IsDependentOn("Publish-Package-NuGet")
238238
.IsDependentOn("Publish-Docker-DockerHub");
239239

dotnet-tools.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"cake.tool": {
6-
"version": "1.0.0-rc0001",
6+
"version": "2.0.0-rc0001",
77
"commands": [
88
"dotnet-cake"
99
]
@@ -19,6 +19,12 @@
1919
"commands": [
2020
"gpr"
2121
]
22+
},
23+
"appy-op": {
24+
"version": "0.8.0",
25+
"commands": [
26+
"appy-op"
27+
]
2228
}
2329
}
2430
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"projects": [ "src" ],
33
"sdk": {
4-
"version": "5.0.100",
4+
"version": "6.0.100",
55
"rollForward": "latestPatch"
66
}
77
}

samples/Appy.Sample.1Password.Api/Appy.Sample.1Password.Api.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<RootNamespace>Appy.Sample.OnePassword.Api</RootNamespace>
66
<IsPackable>false</IsPackable>
77
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
@@ -12,5 +12,4 @@
1212
<ProjectReference Include="..\..\src\Appy.Configuration.1Password\Appy.Configuration.1Password.csproj" />
1313
</ItemGroup>
1414

15-
1615
</Project>

samples/Appy.Sample.1Password.Api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
1+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base
22
WORKDIR /app
33
EXPOSE 80
44
EXPOSE 443
55

6-
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
6+
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
77
WORKDIR /
88
COPY ["samples/Appy.Sample.1Password.Api/Appy.Sample.1Password.Api.csproj", "samples/Appy.Sample.1Password.Api/"]
99
COPY ["src/Appy.Configuration.1Password/Appy.Configuration.1Password.csproj", "src/Appy.Configuration.1Password/"]
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<ProjectReference Include="..\..\src\Appy.Configuration.WinRegistry\Appy.Configuration.WinRegistry.csproj" />
1010
</ItemGroup>
1111

12-
1312
</Project>

src/Appy.Configuration.1Password.Tests/Appy.Configuration.1Password.Tests.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>Appy.Configuration.OnePassword.Tests</RootNamespace>
77
</PropertyGroup>
@@ -14,6 +14,10 @@
1414
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
1515
</ItemGroup>
1616

17+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
18+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
19+
</ItemGroup>
20+
1721
<ItemGroup>
1822
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsPackageVersion)" />
1923
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />

0 commit comments

Comments
 (0)