Skip to content

Commit b7e1cf0

Browse files
committed
Fix $Assets parameter for New-DraftRelease
Can't pass string array directly from pipeline.
1 parent 001966b commit b7e1cf0

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

docs/development.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,10 @@ Update-Version -RepositoryName vscode-powershell
7373
# Push branches to GitHub and ADO
7474
# Open PRs for review
7575
# Download and test assets (assert correct PSES is included)
76-
New-DraftRelease -RepositoryName PowerShellEditorServices
77-
New-DraftRelease -RepositoryName vscode-powershell
78-
# Point releases to branches for automatic tagging
79-
# Upload PowerShellEditorServices.zip (for other extensions)
80-
# Upload VSIX and Install-VSCode.ps1
81-
# Publish draft releases and merge (don't squash!) branches
76+
New-DraftRelease -RepositoryName PowerShellEditorServices -Assets "PowerShellEditorServices.zip"
77+
New-DraftRelease -RepositoryName vscode-powershell -Assets "powershell-YYYY.M.X.vsix", "Install-VSCode.ps1"
8278
# Check telemetry for stability before releasing
79+
# Publish draft releases and merge (don't squash!) branches
8380
vsce publish --packagePath ./PowerShell-<version>.vsix
8481
# Update Install-VSCode.ps1 on gallery
8582
Publish-Script -Path ./Install-VSCode.ps1 -NuGetApiKey (Get-Secret "PowerShell Gallery API Key" -AsPlainText)

tools/ReleaseTools.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function New-DraftRelease {
344344
[ValidateSet([RepoNames])]
345345
[string]$RepositoryName,
346346

347-
[Parameter(ValueFromPipeline)]
347+
[Parameter()]
348348
[string[]]$Assets
349349
)
350350
$Version = Get-Version -RepositoryName $RepositoryName
@@ -362,5 +362,7 @@ function New-DraftRelease {
362362
}
363363

364364
$Release = New-GitHubRelease @ReleaseParams
365+
Write-Output "Draft release URL: $($Release.html_url)"
366+
Write-Output "Uploading assets..."
365367
$Assets | New-GitHubReleaseAsset -Release $Release.Id
366368
}

0 commit comments

Comments
 (0)