docs(changelog): add v0.1.1.3 download and SHA256 links; add release automation scripts (upload/prune/manage/checksums)
This commit is contained in:
30
scripts/collect_binaries.ps1
Normal file
30
scripts/collect_binaries.ps1
Normal file
@ -0,0 +1,30 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$OutDir
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
|
||||
|
||||
$items = @(
|
||||
@{ Path = 'build/Release/privatebinapi.dll'; Optional = $false }
|
||||
@{ Path = 'build/Release/privatebinapi.lib'; Optional = $true }
|
||||
@{ Path = 'build/Release/privatebinapi.pdb'; Optional = $true }
|
||||
@{ Path = 'build/example/Release/example.exe'; Optional = $true }
|
||||
)
|
||||
|
||||
foreach ($it in $items) {
|
||||
$p = Resolve-Path -LiteralPath $it.Path -ErrorAction SilentlyContinue
|
||||
if ($null -ne $p) {
|
||||
Copy-Item -LiteralPath $p.Path -Destination $OutDir -Force
|
||||
Write-Host ("Collected: " + [IO.Path]::GetFileName($p.Path))
|
||||
} elseif (-not $it.Optional) {
|
||||
throw "Required artifact not found: $($it.Path)"
|
||||
} else {
|
||||
Write-Host ("Skip missing optional: " + $it.Path)
|
||||
}
|
||||
}
|
||||
|
||||
Get-ChildItem -LiteralPath $OutDir -File | Format-Table Name,Length -AutoSize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user