-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
29 lines (24 loc) · 1.37 KB
/
build.ps1
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
param(
[Alias('v')]
[Parameter(Mandatory = $true)]
[string]$PackageVersion,
[Alias('mv')]
[string]$MetaPackagePackageReferenceVersion = '1.*',
[string]$ConfigFile = '../../NuGet.config',
[Alias('c')]
[string]$Configuration = 'Debug',
[string]$PackageOutput = '.'
)
$TraceColor = 'DarkCyan'
Write-Host 'dotnet clean starting' -foregroundcolor $TraceColor
dotnet clean
Write-Host 'dotnet clean completed' -foregroundcolor $TraceColor
Write-Host 'dotnet build starting' -foregroundcolor $TraceColor
dotnet build src/ForEvolve.App/ForEvolve.App.csproj -c $Configuration /p:PackageVersion=$PackageVersion /p:MetaPackagePackageReferenceVersion=$MetaPackagePackageReferenceVersion
Write-Host 'dotnet build completed' -foregroundcolor $TraceColor
Write-Host 'dotnet test starting' -foregroundcolor $TraceColor
dotnet test test/ForEvolve.App.Tests/ForEvolve.App.Tests.csproj /p:PackageVersion=$PackageVersion /p:MetaPackagePackageReferenceVersion=$MetaPackagePackageReferenceVersion /p:CollectCoverage=true
Write-Host 'dotnet test completed' -foregroundcolor $TraceColor
Write-Host 'dotnet pack starting' -foregroundcolor $TraceColor
dotnet pack --no-build /p:PackageVersion=$PackageVersion /p:MetaPackagePackageReferenceVersion=$MetaPackagePackageReferenceVersion -c $Configuration -o $PackageOutput
Write-Host 'dotnet pack completed' -foregroundcolor $TraceColor