Skip to content

Commit 6b81d77

Browse files
committed
(build) update dotnet tools
1 parent fcb5fea commit 6b81d77

File tree

10 files changed

+81
-58
lines changed

10 files changed

+81
-58
lines changed

.github/workflows/docs.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,44 @@ jobs:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1717
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
1818
steps:
19-
- uses: actions/[email protected]
19+
-
20+
name: Checkout
21+
uses: actions/checkout@v2
22+
-
23+
name: Cache cake frosting
24+
id: cache-cake
25+
uses: actions/[email protected]
2026
with:
21-
fetch-depth: 0
22-
23-
- name: '[Build Documentation]'
27+
path: run
28+
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
29+
-
30+
name: '[Prepare]'
31+
# if: steps.cache-cake.outputs.cache-hit != 'true'
32+
run: dotnet build build/CI.sln --configuration=Release
33+
-
34+
name: '[Build Documentation]'
2435
shell: pwsh
25-
run: ./build.ps1 -Target Build-Documentation
36+
run: dotnet run/docs.dll --target=BuildDocs
2637

27-
- name: '[HTMLProofer]'
38+
-
39+
name: '[HTMLProofer]'
2840
uses: chabad360/htmlproofer@master
2941
with:
30-
directory: ./artifacts/Documentation
42+
directory: ./artifacts/docs/preview
3143
arguments: --url-ignore /api/ --allow-hash-href --assume-extension --disable-external
32-
33-
- name: '[Remark Lint]'
44+
-
45+
name: '[Remark Lint]'
3446
uses: reviewdog/action-remark-lint@v2
3547
with:
3648
github_token: ${{ secrets.GITHUB_TOKEN }}
3749
reporter: github-pr-check
38-
39-
- name: '[Publish Documentation]'
50+
-
51+
name: '[Publish Documentation]'
4052
if: ${{ github.event_name == 'push' }}
4153
shell: pwsh
42-
run: ./build.ps1 -target Publish-Documentation
43-
44-
- name: '[Publish Documentation]'
54+
run: dotnet run/docs.dll --target=PublishDocs
55+
-
56+
name: '[Publish Documentation]'
4557
if: ${{ github.event_name == 'workflow_dispatch' }}
4658
shell: pwsh
47-
run: ./build.ps1 -target Force-Publish-Documentation -exclusive
59+
run: dotnet run/docs.dll --target=PublishDocs --force

build/artifacts/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Configure(IServiceCollection services)
1212
services.UseLifetime<BuildLifetime>();
1313
services.UseTaskLifetime<BuildTaskLifetime>();
1414

15-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.8"));
15+
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.11"));
1616
}
1717
}
1818
}

build/build/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void Configure(IServiceCollection services)
1414

1515
services.UseTool(new Uri("dotnet:?package=Codecov.Tool&version=1.13.0"));
1616
services.UseTool(new Uri("dotnet:?package=dotnet-format&version=5.0.211103"));
17-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.8"));
17+
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.11"));
1818
}
1919
}
2020
}

build/docker/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Configure(IServiceCollection services)
1212
services.UseLifetime<BuildLifetime>();
1313
services.UseTaskLifetime<BuildTaskLifetime>();
1414

15-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.8"));
15+
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.11"));
1616
}
1717
}
1818
}

build/docs/BuildLifetime.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ public class BuildLifetime : BuildLifetimeBase<BuildContext>
1111
{
1212
public override void Setup(BuildContext context)
1313
{
14-
base.Setup(context);
15-
1614
context.Credentials = Credentials.GetCredentials(context);
1715
context.ForcePublish = context.HasArgument("force");
1816

build/docs/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Configure(IServiceCollection services)
1212
services.UseLifetime<BuildLifetime>();
1313
services.UseTaskLifetime<BuildTaskLifetime>();
1414

15-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.8"));
15+
services.UseTool(new Uri("dotnet:?package=Wyam.Tool&version=2.2.9"));
1616
}
1717
}
1818
}

build/docs/Tasks/BuildDocs.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Cake.Common.Diagnostics;
21
using Cake.Common.IO;
32
using Cake.Frosting;
43
using Cake.Wyam;

build/docs/Tasks/PublishDocs.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,22 @@ namespace Docs.Tasks
1313
{
1414
[TaskName(nameof(PublishDocs))]
1515
[TaskDescription("Published the docs changes to docs specific branch")]
16-
[IsDependentOn(typeof(Clean))]
16+
[IsDependentOn(typeof(PublishDocsInternal))]
1717
public sealed class PublishDocs : FrostingTask<BuildContext>
18+
{
19+
public override bool ShouldRun(BuildContext context)
20+
{
21+
var shouldRun = true;
22+
shouldRun &= context.ShouldRun(context.DirectoryExists(Paths.Docs), "Wyam documentation directory is missing");
23+
24+
return shouldRun;
25+
}
26+
}
27+
28+
[TaskName(nameof(PublishDocsInternal))]
29+
[TaskDescription("Published the docs changes to docs specific branch")]
30+
[IsDependentOn(typeof(Clean))]
31+
public sealed class PublishDocsInternal : FrostingTask<BuildContext>
1832
{
1933
public override bool ShouldRun(BuildContext context)
2034
{

build/publish/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Configure(IServiceCollection services)
1212
services.UseLifetime<BuildLifetime>();
1313
services.UseTaskLifetime<BuildTaskLifetime>();
1414

15-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.8"));
15+
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.6.11"));
1616
}
1717
}
1818
}

dotnet-tools.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"codecov.tool": {
6-
"version": "1.13.0",
7-
"commands": [
8-
"codecov"
9-
]
10-
},
11-
"gitversion.tool": {
12-
"version": "5.6.8",
13-
"commands": [
14-
"dotnet-gitversion"
15-
]
16-
},
17-
"gitreleasemanager.tool": {
18-
"version": "0.11.0",
19-
"commands": [
20-
"dotnet-gitreleasemanager"
21-
]
22-
},
23-
"wyam.tool": {
24-
"version": "2.2.9",
25-
"commands": [
26-
"wyam"
27-
]
28-
},
29-
"dotnet-format": {
30-
"version": "5.0.211103",
31-
"commands": [
32-
"dotnet-format"
33-
]
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"codecov.tool": {
6+
"version": "1.13.0",
7+
"commands": [
8+
"codecov"
9+
]
10+
},
11+
"gitversion.tool": {
12+
"version": "5.6.11",
13+
"commands": [
14+
"dotnet-gitversion"
15+
]
16+
},
17+
"gitreleasemanager.tool": {
18+
"version": "0.12.0",
19+
"commands": [
20+
"dotnet-gitreleasemanager"
21+
]
22+
},
23+
"wyam.tool": {
24+
"version": "2.2.9",
25+
"commands": [
26+
"wyam"
27+
]
28+
},
29+
"dotnet-format": {
30+
"version": "5.0.211103",
31+
"commands": [
32+
"dotnet-format"
33+
]
34+
}
3435
}
35-
}
36-
}
36+
}

0 commit comments

Comments
 (0)