v1.1.0 - Update author, include UIExtension features in manual manifest

This commit is contained in:
2026-04-27 10:44:28 +10:00
parent b2a4528c64
commit 721fba684a
+15 -6
View File
@@ -109,14 +109,27 @@ if (-not $useManifestGen) {
$manifest = [ordered]@{ $manifest = [ordered]@{
Id = $PluginName Id = $PluginName
Name = "AD Compare" Name = "AD Compare"
Author = "Jess" Author = "Jess Rogerson"
Url = "https://gitea.hideawaygaming.com.au/jessikitty/disco-ad-compare-plugin" Url = "https://gitea.hideawaygaming.com.au/jessikitty/disco-ad-compare-plugin"
Version = $version.ToString() Version = $version.ToString()
AssemblyPath = "$PluginName.dll" AssemblyPath = "$PluginName.dll"
TypeName = "Disco.Plugins.ADCompare.ADComparePlugin" TypeName = "Disco.Plugins.ADCompare.ADComparePlugin"
ConfigurationHandlerTypeName = "Disco.Plugins.ADCompare.ConfigurationHandler.ADCompareConfigurationHandler" ConfigurationHandlerTypeName = "Disco.Plugins.ADCompare.ConfigurationHandler.ADCompareConfigurationHandler"
WebHandlerTypeName = "Disco.Plugins.ADCompare.WebHandler.ADCompareWebHandler" WebHandlerTypeName = "Disco.Plugins.ADCompare.WebHandler.ADCompareWebHandler"
Features = @() Features = @(
[ordered]@{
Id = "ADCompareDeviceUI"
Name = "Device Page - AD Compare"
TypeName = "Disco.Plugins.ADCompare.Features.DeviceUIExtension"
CategoryName = "User Interface Extensions"
},
[ordered]@{
Id = "ADCompareUserUI"
Name = "User Page - AD Compare"
TypeName = "Disco.Plugins.ADCompare.Features.UserUIExtension"
CategoryName = "User Interface Extensions"
}
)
} }
$manifest | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $buildOutput "manifest.json") -Encoding UTF8 $manifest | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $buildOutput "manifest.json") -Encoding UTF8
Write-Host "Manual manifest.json created" -ForegroundColor Green Write-Host "Manual manifest.json created" -ForegroundColor Green
@@ -125,7 +138,6 @@ if (-not $useManifestGen) {
# --- Package --- # --- Package ---
Write-Host "`nPackaging .discoPlugin file..." -ForegroundColor Yellow Write-Host "`nPackaging .discoPlugin file..." -ForegroundColor Yellow
# Only include the plugin DLL, PDB, and manifest - nothing else
$includeFiles = @("$PluginName.dll", "$PluginName.pdb", "manifest.json") $includeFiles = @("$PluginName.dll", "$PluginName.pdb", "manifest.json")
if (-not $version) { if (-not $version) {
@@ -135,11 +147,9 @@ if (-not $version) {
$packageName = "$PluginName-$($version.ToString()).discoPlugin" $packageName = "$PluginName-$($version.ToString()).discoPlugin"
$packagePath = Join-Path $PluginDir $packageName $packagePath = Join-Path $PluginDir $packageName
# Clean old packages
Get-ChildItem $PluginDir -Filter "*.discoPlugin" | Remove-Item -Force Get-ChildItem $PluginDir -Filter "*.discoPlugin" | Remove-Item -Force
Get-ChildItem $PluginDir -Filter "*.zip" | Where-Object { $_.Name -like "$PluginName*" } | Remove-Item -Force Get-ChildItem $PluginDir -Filter "*.zip" | Where-Object { $_.Name -like "$PluginName*" } | Remove-Item -Force
# Build clean temp folder with only plugin files
$tempPkg = Join-Path $env:TEMP "discoplugin_$([guid]::NewGuid().ToString('N'))" $tempPkg = Join-Path $env:TEMP "discoplugin_$([guid]::NewGuid().ToString('N'))"
New-Item -ItemType Directory -Path $tempPkg -Force | Out-Null New-Item -ItemType Directory -Path $tempPkg -Force | Out-Null
foreach ($f in $includeFiles) { foreach ($f in $includeFiles) {
@@ -154,7 +164,6 @@ Get-ChildItem $tempPkg -File | ForEach-Object {
Write-Host " $($_.Name)" -ForegroundColor Gray Write-Host " $($_.Name)" -ForegroundColor Gray
} }
# Create as .zip first (Compress-Archive requires .zip), then rename
$zipPath = Join-Path $PluginDir "$PluginName-$($version.ToString()).zip" $zipPath = Join-Path $PluginDir "$PluginName-$($version.ToString()).zip"
Compress-Archive -Path "$tempPkg\*" -DestinationPath $zipPath -Force Compress-Archive -Path "$tempPkg\*" -DestinationPath $zipPath -Force
Rename-Item $zipPath $packageName -Force Rename-Item $zipPath $packageName -Force