Skip to content

Commit 1979ae9

Browse files
committed
Added possibility to skip tests in build script.
1 parent 2e9fa6c commit 1979ae9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Build.ps1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
param
22
(
3-
$Configuration = "Release",
4-
$Version = "0.0.0.0",
5-
$PackageVersion = "0.0.0"
3+
[string] $Configuration = "Release",
4+
[string] $Version = "0.0.0.0",
5+
[string] $PackageVersion = "0.0.0",
6+
[switch] $SkipTests = $false
67
)
78

89
Push-Location $PSScriptRoot
@@ -15,8 +16,11 @@ try
1516
Write-Output "Building..."
1617
dotnet build --configuration $Configuration --verbosity minimal --nologo -p:Version=$Version -p:PackageVersion=$PackageVersion
1718

18-
Write-Output "Running unit tests..."
19-
dotnet test --configuration $Configuration --no-build --nologo
19+
if ($SkipTests)
20+
{
21+
Write-Output "Running unit tests..."
22+
dotnet test --configuration $Configuration --no-build --nologo
23+
}
2024

2125
Write-Output "Creating artifacts..."
2226
if (Test-Path dist)

0 commit comments

Comments
 (0)