-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathbuild.ps1
More file actions
executable file
·30 lines (21 loc) · 742 Bytes
/
build.ps1
File metadata and controls
executable file
·30 lines (21 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /usr/bin/env pwsh
#Requires -PSEdition Core
#Requires -Version 7
param(
[Parameter(Mandatory = $false)][string] $Configuration = "Release"
)
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
dotnet pack --configuration $Configuration
if ($LASTEXITCODE -ne 0) {
throw "dotnet pack failed with exit code $LASTEXITCODE"
}
$additionalArgs = @()
if (![string]::IsNullOrEmpty(${env:GITHUB_SHA})) {
$additionalArgs += "--logger:GitHubActions;report-warnings=false;summary-include-passed=false"
$additionalArgs += "--logger:junit;LogFilePath=junit.xml"
}
dotnet test --configuration $Configuration $additionalArgs
if ($LASTEXITCODE -ne 0) {
throw "dotnet test failed with exit code $LASTEXITCODE"
}