Compare commits

..

2 Commits

Author SHA1 Message Date
aac8f3c820 excluded the release dir 2026-01-16 09:43:10 +01:00
12edafd580 added build script 2026-01-16 09:39:25 +01:00
2 changed files with 54 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ obj/
out/ out/
publish/ publish/
# Release builds
release/
# Visual Studio / VS Code # Visual Studio / VS Code
.vs/ .vs/
.vscode/ .vscode/

View File

@@ -0,0 +1,51 @@
# ============================================
# Analog System Monitor Release Script
# Creates a clean, single-file Windows build
# ============================================
param(
[string]$Version = "1.0.0"
)
$ErrorActionPreference = "Stop"
Write-Host "=== Analog System Monitor Release Script ==="
Write-Host "Version: $Version"
Write-Host ""
# Paths
$project = "analog_system_monitor.csproj"
$releaseDir = "release\$Version"
# Clean old release
if (Test-Path $releaseDir) {
Write-Host "Cleaning old release directory..."
Remove-Item -Recurse -Force $releaseDir
}
# Ensure release directory exists
New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
Write-Host "Restoring packages..."
dotnet restore $project
Write-Host "Cleaning project..."
dotnet clean $project -c Release
Write-Host "Publishing single-file executable..."
dotnet publish $project `
-c Release `
-r win-x64 `
--self-contained true `
/p:PublishSingleFile=true `
/p:IncludeNativeLibrariesForSelfExtract=true `
/p:DebugType=None `
/p:DebugSymbols=false `
/p:Version=$Version `
-o "$releaseDir"
Write-Host ""
Write-Host "============================================"
Write-Host " Release build completed successfully"
Write-Host " Output folder: $releaseDir"
Write-Host "============================================"