-
-
Notifications
You must be signed in to change notification settings - Fork 493
/
pack.ps1
26 lines (22 loc) · 1012 Bytes
/
pack.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
# Ensure the script is executed in the root of the Harmony project
if (-not (Test-Path .git) -or -not (Test-Path Harmony.sln)) {
Write-Host "This script must be run from the root of the Harmony project."
exit
}
# Clear out old pack results from Harmony\bin and clean the project once for all configurations
Write-Host "Cleaning Harmony\bin directory and project..."
if (Test-Path Harmony\bin) {
Remove-Item Harmony\bin -Recurse
}
New-Item -ItemType Directory -Path Harmony\bin | Out-Null
# Clean the project
dotnet clean --nologo --verbosity minimal
# Define configurations
$configurations = @('ReleaseFat', 'ReleaseThin', 'DebugFat', 'DebugThin')
# Loop through each configuration for building and packing
foreach ($config in $configurations) {
Write-Host "Processing configuration: $config"
# Building the project for the specific configuration
dotnet build --nologo --configuration $config --verbosity minimal
dotnet pack --nologo --configuration $config --verbosity minimal
}