Skip to content

Commit

Permalink
Removes suppression and adds error checks to build tasks (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpduda authored Jan 1, 2024
1 parent 9a1a4d7 commit 5921511
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 45 deletions.
35 changes: 34 additions & 1 deletion UpbeatUI.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Param(
[String] $verbosity = 'quiet',
[Parameter(Mandatory = $false, Position = 2)]
[Alias('gcs')]
[Boolean] $generateCompatibilitySuppression = $false
[Boolean] $generateCompatibilitySuppression = $false
)

task RestoreAll RestoreBase, RestoreDependencyInjection, RestoreHosting, `
Expand All @@ -25,34 +25,39 @@ task RestoreBase {
dotnet restore `
'.\source\UpbeatUI' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rb RestoreBase

task RestoreDependencyInjection {
dotnet restore `
'.\source\UpbeatUI.Extensions.DependencyInjection' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rdi RestoreDependencyInjection

task RestoreHosting {
dotnet restore `
'.\source\UpbeatUI.Extensions.Hosting' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rh RestoreHosting

task RestoreTests {
dotnet restore `
'.\source\UpbeatUI.Tests' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rt RestoreTests

task RestoreManualSample {
dotnet restore `
'.\samples\ManualUpbeatUISample' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rms RestoreManualSample

Expand All @@ -61,6 +66,7 @@ task RestoreServiceProvidedSample {
'.\samples\ServiceProvidedUpbeatUISample' `
--no-dependencies `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rsps RestoreServiceProvidedSample

Expand All @@ -69,6 +75,7 @@ task RestoreHostedSample {
'.\samples\HostedUpbeatUISample' `
--no-dependencies `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task rhs RestoreHostedSample

Expand All @@ -85,6 +92,7 @@ task BuildBase {
'.\source\UpbeatUI' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bb BuildBase

Expand All @@ -93,6 +101,7 @@ task BuildDependencyInjection {
'.\source\UpbeatUI.Extensions.DependencyInjection' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bdi BuildDependencyInjection

Expand All @@ -101,6 +110,7 @@ task BuildHosting {
'.\source\UpbeatUI.Extensions.Hosting' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bh BuildHosting

Expand All @@ -109,6 +119,7 @@ task BuildTests {
'.\source\UpbeatUI.Tests' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bt BuildTests

Expand All @@ -120,6 +131,7 @@ task BuildManualSample {
'.\samples\ManualUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bms BuildManualSample

Expand All @@ -128,6 +140,7 @@ task BuildServiceProvidedSample {
'.\samples\ServiceProvidedUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bsps BuildServiceProvidedSample

Expand All @@ -136,6 +149,7 @@ task BuildHostedSample {
'.\samples\HostedUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task bhs BuildHostedSample

Expand All @@ -150,6 +164,7 @@ task PackBase {
-c Release `
/p:ContinuousIntegrationBuild=true `
/p:GenerateCompatibilitySuppressionFile=$generateCompatibilitySuppression
equals $LASTEXITCODE 0
}
task pb PackBase

Expand All @@ -160,6 +175,7 @@ task PackDependencyInjection {
-c Release `
/p:ContinuousIntegrationBuild=true `
/p:GenerateCompatibilitySuppressionFile=$generateCompatibilitySuppression
equals $LASTEXITCODE 0
}
task pdi PackDependencyInjection

Expand All @@ -171,6 +187,7 @@ task PackHosting {
-c Release `
/p:ContinuousIntegrationBuild=true `
/p:GenerateCompatibilitySuppressionFile=$generateCompatibilitySuppression
equals $LASTEXITCODE 0
}
task ph PackHosting

Expand All @@ -187,6 +204,10 @@ task PublishBase SetPublishApiKey, PackBase, {
$versionString = "$($version.Major).$($version.Minor).$($version.Build)"
if ($Host.UI.PromptForChoice("About to publish UpbeatUI package version $versionString", 'Continue?', ('&Yes', '&No'), 1) -eq 0) {
dotnet nuget push "source\UpbeatUI\bin\Release\UpbeatUI.$($versionString).nupkg" --api-key $clearapikey --source "https://api.nuget.org/v3/index.json"
equals $LASTEXITCODE 0
}
else {
throw "Canceled"
}
}
task pubb PublishBase
Expand All @@ -196,6 +217,10 @@ task PublishDependencyInjection SetPublishApiKey, PackDependencyInjection, {
$versionString = "$($version.Major).$($version.Minor).$($version.Build)"
if ($Host.UI.PromptForChoice("About to publish UpbeatUI.Extensions.DependencyInjection package version $versionString", 'Continue?', ('&Yes', '&No'), 1) -eq 0) {
dotnet nuget push "source\UpbeatUI.Extensions.DependencyInjection\bin\Release\UpbeatUI.Extensions.DependencyInjection.$($versionString).nupkg" --api-key $clearapikey --source "https://api.nuget.org/v3/index.json"
equals $LASTEXITCODE 0
}
else {
throw "Canceled"
}
}
task pubdi PublishDependencyInjection
Expand All @@ -205,6 +230,10 @@ task PublishHosting SetPublishApiKey, PackHosting, {
$versionString = "$($version.Major).$($version.Minor).$($version.Build)"
if ($Host.UI.PromptForChoice("About to publish UpbeatUI.Extensions.Hosting package version $versionString", 'Continue?', ('&Yes', '&No'), 1) -eq 0) {
dotnet nuget push "source\UpbeatUI.Extensions.Hosting\bin\Release\UpbeatUI.Extensions.Hosting.$($versionString).nupkg" --api-key $clearapikey --source "https://api.nuget.org/v3/index.json"
equals $LASTEXITCODE 0
}
else {
throw "Canceled"
}
}
task pubh PublishHosting
Expand Down Expand Up @@ -257,6 +286,7 @@ task RunTests {
dotnet test `
'.\source\UpbeatUI.Tests' `
--verbosity $verbosity
equals $LASTEXITCODE 0
}
task runt RunTests

Expand All @@ -265,6 +295,7 @@ task RunManualSample {
--project '.\samples\ManualUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task runms RunManualSample

Expand All @@ -273,6 +304,7 @@ task RunServiceProvidedSample {
--project '.\samples\ServiceProvidedUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task runsps RunServiceProvidedSample

Expand All @@ -281,5 +313,6 @@ task RunHostedSample {
--project '.\samples\HostedUpbeatUISample' `
--verbosity $verbosity `
-c Debug
equals $LASTEXITCODE 0
}
task runhs RunHostedSample
44 changes: 0 additions & 44 deletions source/UpbeatUI/CompatibilitySuppressions.xml

This file was deleted.

0 comments on commit 5921511

Please sign in to comment.