enprot 0.5.8

Engyon Protected Text (EPT) — confidentiality processor and capability ledger
$name = "$Env:PROJECT_NAME-$Env:RELEASE_TAG-$Env:TARGET"
New-Item -ItemType Directory -Force -Path $(Join-Path 'staging' "$name")

$files = @("$Env:EXE_PATH", 'README.adoc', 'LICENSE')
ForEach ($file in $files) {
  if (Test-Path $file) {
    Copy-Item -LiteralPath "$file" -Destination $(Join-Path 'staging' "$name")
  }
}

# Man page + completions (generated by generate-extras job).
if (Test-Path extras/enprot.1) {
  Copy-Item extras/enprot.1 $(Join-Path 'staging' "$name")
}
if (Test-Path extras/completions) {
  $compDir = Join-Path $(Join-Path 'staging' "$name") 'completions'
  New-Item -ItemType Directory -Force -Path $compDir | Out-Null
  Copy-Item extras/completions/* $compDir
}

New-Item -ItemType Directory -Force -Path 'archives'
$outname = Join-Path "$PWD" $(Join-Path 'archives' "$name.zip")
Push-Location -LiteralPath 'staging'
& 7z a "$outname" "$name"
Pop-Location