Skip to content

Commit a23c74e

Browse files
authored
Migrate from cake to dotnet commands (#762)
1 parent 2d1cd21 commit a23c74e

File tree

7 files changed

+18
-127
lines changed

7 files changed

+18
-127
lines changed

.editorconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ indent_style = tab
6868
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
6969
##########################################
7070

71-
[*.{cs,csx,cake,vb,vbx}]
71+
[*.{cs,csx,vb,vbx}]
7272
# Default Severity for all .NET Code Style rules below
7373
dotnet_analyzer_diagnostic.severity = warning
7474

@@ -79,7 +79,7 @@ dotnet_analyzer_diagnostic.severity = warning
7979

8080
# .NET Style Rules
8181
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#net-style-rules
82-
[*.{cs,csx,cake,vb,vbx}]
82+
[*.{cs,csx,vb,vbx}]
8383
# "this." and "Me." qualifiers
8484
dotnet_style_qualification_for_field = true:warning
8585
dotnet_style_qualification_for_property = true:warning
@@ -128,7 +128,7 @@ dotnet_diagnostic.IDE0130.severity = suggestion
128128

129129
# C# Style Rules
130130
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
131-
[*.{cs,csx,cake}]
131+
[*.{cs,csx}]
132132
# 'var' preferences
133133
csharp_style_var_for_built_in_types = true:warning
134134
csharp_style_var_when_type_is_apparent = true:warning
@@ -177,12 +177,12 @@ csharp_style_namespace_declarations = file_scoped:warning
177177
##########################################
178178

179179
# .NET Unnecessary code rules
180-
[*.{cs,csx,cake,vb,vbx}]
180+
[*.{cs,csx,vb,vbx}]
181181
dotnet_code_quality_unused_parameters = all:warning
182182
dotnet_remove_unnecessary_suppression_exclusions = none:warning
183183

184184
# C# Unnecessary code rules
185-
[*.{cs,csx,cake}]
185+
[*.{cs,csx}]
186186
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
187187
dotnet_diagnostic.IDE0058.severity = suggestion
188188
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
@@ -195,14 +195,14 @@ dotnet_diagnostic.IDE0059.severity = suggestion
195195

196196
# .NET formatting rules
197197
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#net-formatting-rules
198-
[*.{cs,csx,cake,vb,vbx}]
198+
[*.{cs,csx,vb,vbx}]
199199
# Organize using directives
200200
dotnet_sort_system_directives_first = true
201201
dotnet_separate_import_directive_groups = false
202202

203203
# C# formatting rules
204204
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
205-
[*.{cs,csx,cake}]
205+
[*.{cs,csx}]
206206
# Newline options
207207
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
208208
csharp_new_line_before_open_brace = all
@@ -254,7 +254,7 @@ csharp_preserve_single_line_blocks = true
254254
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules
255255
##########################################
256256

257-
[*.{cs,csx,cake,vb,vbx}]
257+
[*.{cs,csx,vb,vbx}]
258258

259259
##########################################
260260
# Styles

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ jobs:
3939
fetch-depth: 0
4040
- name: 'Install .NET Core SDK'
4141
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
42-
- name: 'Dotnet Tool Restore'
43-
run: dotnet tool restore
42+
- name: 'Dotnet Restore'
43+
run: dotnet restore
4444
shell: pwsh
45-
- name: 'Dotnet Cake Build'
46-
run: dotnet cake --target=Build
45+
- name: 'Dotnet Build'
46+
run: dotnet build --configuration Release --no-restore
4747
shell: pwsh
48-
- name: 'Dotnet Cake Test'
49-
run: dotnet cake --target=Test
48+
- name: 'Dotnet Test'
49+
run: dotnet test --configuration Release --no-build --no-restore
5050
shell: pwsh
51-
- name: 'Dotnet Cake Pack'
52-
run: dotnet cake --target=Pack
51+
- name: 'Dotnet Pack'
52+
run: dotnet pack --configuration Release --no-build --no-restore --output ./artifacts
5353
shell: pwsh
5454
- name: 'Publish artifacts'
5555
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,6 @@ paket-files/
308308
__pycache__/
309309
*.pyc
310310

311-
# Cake - Uncomment if you are using it
312-
# tools/**
313-
# !tools/packages.config
314-
315311
# Tabs Studio
316312
*.tss
317313

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ Set up the repository locally. Replace `<your account name>` with the name of th
2525
```shell
2626
git clone https://github.com/<your account name>/webhooks.net.git
2727
cd webhooks.net
28-
dotnet tool restore
29-
dotnet cake --target=Build
28+
dotnet build
3029
```
3130

3231
Run the tests before making changes to make sure the local setup is working as expected
3332

3433
```shell
35-
dotnet cake --target=Test
34+
dotnet test
3635
```
3736

3837
## Submitting the Pull Request

Octokit.Webhooks.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
.editorconfig = .editorconfig
1414
.gitattributes = .gitattributes
1515
.gitignore = .gitignore
16-
build.cake = build.cake
1716
Directory.Build.props = Directory.Build.props
1817
Directory.Build.targets = Directory.Build.targets
1918
dotnet-tools.json = dotnet-tools.json

build.cake

Lines changed: 0 additions & 91 deletions
This file was deleted.

dotnet-tools.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)