Skip to content

Commit d21df72

Browse files
authored
Fixing build errors with CI (#31)
* Swap cake for direct msbuild invocation * Use manual shell invocation task for msbuild * Copy nupkg to single folder before publishing artifacts * Enable folder flattening when copying files * Only include ColorCode nupkg files * Removed cake * Revert "Removed cake" This reverts commit b67b4bb. * Removed cake tooling * Use PackageOutputPath instead of copying files * Use .editorconfig for file headers
1 parent ec15cb8 commit d21df72

9 files changed

+19
-475
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Remove the line below if you want to inherit .editorconfig settings from higher directories
2+
root = true
3+
4+
# Generated code
5+
[*{_AssemblyInfo.cs,.g.cs}]
6+
generated_code = true
7+
8+
# All files
9+
[*]
10+
11+
# .NET Foundation Header
12+
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.\nSee the LICENSE file in the project root for more information.
13+
14+
# Require file header
15+
dotnet_diagnostic.IDE0073.severity = warning

ColorCode.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorCode.WinUI", "ColorCod
1919
EndProject
2020
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A4B1B99B-FC3A-4C76-8B46-B96723829FD2}"
2121
ProjectSection(SolutionItems) = preProject
22+
.editorconfig = .editorconfig
2223
azure-pipelines.yml = azure-pipelines.yml
23-
build\build.cake = build\build.cake
2424
ColorCode.snk = ColorCode.snk
2525
Directory.Build.props = Directory.Build.props
2626
Directory.Build.targets = Directory.Build.targets

azure-pipelines.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,8 @@ steps:
4747

4848
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
4949

50-
- task: DotNetCoreCLI@2
51-
inputs:
52-
command: custom
53-
custom: msbuild
54-
arguments: /t:restore .\ColorCode.sln
55-
displayName: NuGet restore
56-
57-
- powershell: .\build\build.ps1
58-
displayName: Build
50+
- script: msbuild -p:Configuration=Release -r -t:pack -p:GenerateLibraryLayout=true -p:PackageOutputPath=..\build\nupkg .\ColorCode.sln
51+
displayName: Build and pack
5952

6053
- task: PowerShell@2
6154
displayName: Authenticode Sign Packages
@@ -70,6 +63,6 @@ steps:
7063
- task: PublishBuildArtifacts@1
7164
displayName: Publish Package Artifacts
7265
inputs:
73-
pathToPublish: .\build\nupkg
66+
pathToPublish: 'build\nupkg'
7467
artifactType: container
7568
artifactName: Packages

build/Build.bat

-3
This file was deleted.

build/UpdateHeaders.bat

-3
This file was deleted.

build/build.cake

-177
This file was deleted.

0 commit comments

Comments
 (0)