Files
gregCore/scripts/Build-Release.ps1
T
Marvin abbd440bf1
Sponsor Tier Sync / sync (push) Failing after 34s
gregCore CI / build (push) Has been cancelled
feat: Implement core performance and automation modules
- Added RepairEngine for device repair automation.
- Introduced GregFrameRateLimiter to manage frame rates based on performance profiles.
- Implemented GregMemoryPressureHandler to handle memory pressure events and optimize garbage collection.
- Created GregOperationQueue for managing and throttling operations with priority.
- Developed GregPerformanceGovernor to oversee performance management and resource monitoring.
- Added GregRequestThrottler to limit concurrent operations and requests.
- Implemented GregResourceMonitor to track system resource usage and publish metrics.
- Introduced IAssemblyScanner interface for plugin assembly scanning.
- Added various public API modules including GregAutomationModule, GregEconomyModule, GregFacilityModule, GregNetworkModule, GregNpcModule, GregPerformanceModule, GregPlayerModule, GregSaveModule, GregServerModule, GregTimeModule, and GregUIModule for enhanced game functionality.
- Created event handling and resource snapshot types for better event management and performance tracking.
2026-04-20 04:25:54 +02:00

49 lines
1.6 KiB
PowerShell

# Build-Release.ps1
# Builds gregCore and packages it for release.
$ErrorActionPreference = "Stop"
$repoRoot = Resolve-Path "$PSScriptRoot\.."
$buildDir = "$repoRoot\bin\Release"
$publishDir = "$repoRoot\publish"
Write-Host "--- gregCore Build & Package Script ---" -ForegroundColor Cyan
# 1. Clean up
if (Test-Path $publishDir) { Remove-Item -Recurse -Force $publishDir }
New-Item -ItemType Directory -Path $publishDir | Out-Null
# 2. Build
Write-Host "Building gregCore (Release)..." -ForegroundColor Yellow
dotnet build "$repoRoot\src\gregCore.csproj" -c Release -o "$buildDir"
# 3. Check output
$dllPath = "$buildDir\gregCore.dll"
if (-not (Test-Path $dllPath)) {
Write-Error "Build failed: gregCore.dll not found at $dllPath"
}
# 4. Package
$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($dllPath).FileVersion
$zipName = "gregCore-v$version.zip"
$zipPath = "$publishDir\$zipName"
Write-Host "Packaging version $version into $zipName..." -ForegroundColor Yellow
# Copy files to a temporary folder for zipping
$tmpDir = "$publishDir\tmp"
if (Test-Path $tmpDir) { Remove-Item -Recurse -Force $tmpDir }
New-Item -ItemType Directory -Path $tmpDir | Out-Null
Copy-Item $dllPath -Destination $tmpDir
Copy-Item "$repoRoot\README.md" -Destination $tmpDir
Copy-Item "$repoRoot\CHANGELOG.md" -Destination $tmpDir
Copy-Item "$repoRoot\assets\greg_hooks.json" -Destination $tmpDir
# Create zip
Compress-Archive -Path "$tmpDir\*" -DestinationPath $zipPath -Force
Remove-Item -Recurse -Force $tmpDir
Write-Host "--- Successfully packaged gregCore to $zipPath ---" -ForegroundColor Green