Skip to content

Commit 4866cf0

Browse files
committed
ci: set some output to only be visible in debug mode (sign.ps1)
1 parent 7650b9a commit 4866cf0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build/sign.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ function Initialize-DirectoryStructure {
9797
Packages = Join-Path $BaseDirectory "signed\packages"
9898
}
9999

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

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

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

@@ -377,7 +379,9 @@ function Invoke-NuGetPackageSigning {
377379
}
378380

379381
Write-Host "`n✨ Package signing process completed successfully! ✨" -ForegroundColor Green
380-
return $directories.Packages
382+
Write-Host "➡️ Locate your signed packages here: $($directories.Packages)" -ForegroundColor Yellow
383+
384+
return
381385
}
382386
catch {
383387
Write-Host "`n❌ Error occurred:" -ForegroundColor Red

0 commit comments

Comments
 (0)