@@ -278,8 +278,6 @@ function Update-Changelog {
278278 git commit - m " Update CHANGELOG for `` $Version `` "
279279 }
280280 }
281-
282- Update-Version - RepositoryName $RepositoryName
283281}
284282
285283<#
@@ -304,6 +302,7 @@ function Update-Changelog {
304302 - `name` field has `-preview` appended similarly
305303 - `displayName` field has ` Preview` appended similarly
306304 - `description` field has `(Preview) ` prepended similarly
305+ - `icon` field has `_Preview ` inserted similarly
307306#>
308307function Update-Version {
309308 [CmdletBinding (SupportsShouldProcess )]
@@ -369,8 +368,6 @@ function Update-Version {
369368 git commit - m " Bump version to `` v$Version `` "
370369 } # TODO: Git reset to unstage
371370 }
372-
373- New-ReleasePR - RepositoryName $RepositoryName
374371}
375372
376373<#
@@ -416,6 +413,45 @@ function New-ReleasePR {
416413 $Repo | Add-GitHubIssueLabel - Issue $PR.PullRequestNumber - LabelName " Ignore"
417414}
418415
416+ <#
417+ . SYNOPSIS
418+ Kicks off the whole release process.
419+ . DESCRIPTION
420+ This first updates the changelog (which creates and checks out the `release`
421+ branch), commits the changes, updates the version (and commits), pushes the
422+ branch, and then creates a GitHub PR for the release for both repositories.
423+
424+ This is the function meant to be called by a maintainer as the first manual
425+ step to creating a release: it calls the correct functions in order to prepare
426+ the release. Each repository's release branch then needs to be pushed to the
427+ internal Azure DevOps mirror, at which point the automatic release pipeline
428+ will build and sign the assets, and queue up draft GitHub releases (using
429+ `New-DraftRelease` below). Those releases need to be manually validated and
430+ approved, and finally the last step is to approve the pipeline to publish the
431+ assets to the marketplace and gallery.
432+ #>
433+ function New-Release {
434+ [CmdletBinding (SupportsShouldProcess )]
435+ param (
436+ [Parameter (Mandatory )]
437+ [ValidateScript ({ $_.StartsWith (" v" ) })]
438+ [string ]$PsesVersion ,
439+
440+ [Parameter (Mandatory )]
441+ [ValidateScript ({ $_.StartsWith (" v" ) })]
442+ [string ]$VsceVersion
443+ )
444+ " PowerShellEditorServices" , " vscode-powershell" | ForEach-Object {
445+ $Version = switch ($_ ) {
446+ " PowerShellEditorServices" { $PsesVersion }
447+ " vscode-powershell" { $VsceVersion }
448+ }
449+ Update-Changelog - RepositoryName $_ - Version $Version
450+ Update-Version - RepositoryName $_
451+ New-ReleasePR - RepositoryName $_
452+ }
453+ }
454+
419455<#
420456. SYNOPSIS
421457 Creates a new draft GitHub release and Git tag from the updated changelog.
0 commit comments