mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
27 lines
752 B
PowerShell
27 lines
752 B
PowerShell
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$FilesJsonPath,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$PrivateKeyPath,
|
|
|
|
[Parameter(Mandatory = $false)]
|
|
[string]$OutputPath
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
if ([string]::IsNullOrWhiteSpace($OutputPath)) {
|
|
$OutputPath = "$FilesJsonPath.sig"
|
|
}
|
|
|
|
$toolProject = Join-Path $PSScriptRoot "..\PenguinLogisticsOnlineNetworkDistributionSystem\src\Plonds.Tool\Plonds.Tool.csproj"
|
|
if (-not (Test-Path -LiteralPath $toolProject)) {
|
|
throw "PLONDS tool project not found: $toolProject"
|
|
}
|
|
|
|
& dotnet run --project $toolProject -- sign --manifest $FilesJsonPath --private-key $PrivateKeyPath --output $OutputPath
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "PLONDS sign command failed."
|
|
}
|