Compare commits
2 Commits
e796f899f0
...
aac8f3c820
| Author | SHA1 | Date | |
|---|---|---|---|
| aac8f3c820 | |||
| 12edafd580 |
3
analog_system_monitor_dotnet/.gitignore
vendored
3
analog_system_monitor_dotnet/.gitignore
vendored
@@ -4,6 +4,9 @@ obj/
|
|||||||
out/
|
out/
|
||||||
publish/
|
publish/
|
||||||
|
|
||||||
|
# Release builds
|
||||||
|
release/
|
||||||
|
|
||||||
# Visual Studio / VS Code
|
# Visual Studio / VS Code
|
||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|||||||
51
analog_system_monitor_dotnet/release.ps1
Normal file
51
analog_system_monitor_dotnet/release.ps1
Normal 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 "============================================"
|
||||||
Reference in New Issue
Block a user