Skip to content

Commit

Permalink
ci: enable warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Aug 23, 2024
1 parent d713aae commit 5573c0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ stages:
$adjustedPackageVersion="$(GitVersion.SemVer)".ToLower();
# Pack the Uno.Sdk
& dotnet build src\Uno.Sdk\Uno.Sdk.csproj -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=$(GitVersion.AssemblySemVer) /bl:$(build.artifactstagingdirectory)\uno.sdk-pack.binlog -o $(build.artifactstagingdirectory)
& dotnet build src\Uno.Sdk\Uno.Sdk.csproj -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=$(GitVersion.AssemblySemVer) /bl:$(build.artifactstagingdirectory)\uno.sdk-pack.binlog -o $(build.artifactstagingdirectory) /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
displayName: Pack Uno.Sdk
- powershell: |
$adjustedPackageVersion="$(GitVersion.SemVer)".ToLower();
# Pack the Uno.Templates
& dotnet build src\Uno.Templates\Uno.Templates.csproj -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=$(GitVersion.AssemblySemVer) /bl:$(build.artifactstagingdirectory)\uno.templates-pack.binlog -o $(build.artifactstagingdirectory)
& dotnet build src\Uno.Templates\Uno.Templates.csproj -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=$(GitVersion.AssemblySemVer) /bl:$(build.artifactstagingdirectory)\uno.templates-pack.binlog -o $(build.artifactstagingdirectory) /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
displayName: Pack Uno.Templates
Expand Down
2 changes: 1 addition & 1 deletion build/templates/package-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ steps:
{
# Build the app
pushd $testName
& dotnet build $testName.sln "/bl:$(System.ArtifactsDirectory)/$testName.$(Agent.OS).$dotnetVersion.binlog"
& dotnet build $testName.sln "/bl:$(System.ArtifactsDirectory)/$testName.$(Agent.OS).$dotnetVersion.binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
if ($LASTEXITCODE -ne 0)
{
echo "Build failed for $testName"
Expand Down
4 changes: 2 additions & 2 deletions build/templates/template-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ steps:
if ('${{ parameters.templateName }}' -eq 'unoapp-uwp')
{
$msbuild = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
& $msbuild /r "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
& $msbuild /r "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
}
else
{
& dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
& dotnet build "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog" /p:TreatWarningsAsErrors=true /p:NoWarn=NU1507;CS1591
}
if ($LASTEXITCODE -ne 0)
Expand Down

0 comments on commit 5573c0b

Please sign in to comment.