Skip to content

Commit

Permalink
ci: set some output to only be visible in debug mode (sign.ps1)
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed Dec 18, 2024
1 parent 7650b9a commit 4866cf0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build/sign.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ function Initialize-DirectoryStructure {
Packages = Join-Path $BaseDirectory "signed\packages"
}

Write-Host "`nCreating directory structure..."
Write-Debug "`nCreating directory structure..."
# Only create the directories we'll manage
$directories.Keys | Where-Object { $_ -ne 'WorkingDir' } | ForEach-Object {
$dir = $directories[$_]
if (-not (Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Write-Host "✓ Created: $dir"
Write-Debug "✓ Created: $dir"
}
}

Expand Down Expand Up @@ -158,6 +158,8 @@ How to use:
> . \.Yubico.NET.SDK\build\sign.ps1
4. The script can be invoked by following the examples below.
Set $DebugPreference = "Continue" for verbose output
.PARAMETER Thumbprint
The thumbprint of the signing certificate stored on the smart card.
Expand Down Expand Up @@ -307,7 +309,7 @@ function Invoke-NuGetPackageSigning {
Write-Host "Extracting to: $extractPath"
Expand-Archive -Path $package.FullName -DestinationPath $extractPath -Force

Write-Host "Cleaning package structure"
Write-Debug "Cleaning package structure"
Get-ChildItem -Path $extractPath -Recurse -Include "_rels", "package" | Remove-Item -Force -Recurse
Get-ChildItem -Path $extractPath -Recurse -Filter '[Content_Types].xml' | Remove-Item -Force

Expand Down Expand Up @@ -377,7 +379,9 @@ function Invoke-NuGetPackageSigning {
}

Write-Host "`n✨ Package signing process completed successfully! ✨" -ForegroundColor Green
return $directories.Packages
Write-Host "➡️ Locate your signed packages here: $($directories.Packages)" -ForegroundColor Yellow

return
}
catch {
Write-Host "`n❌ Error occurred:" -ForegroundColor Red
Expand Down

0 comments on commit 4866cf0

Please sign in to comment.