@@ -278,8 +278,6 @@ function Update-Changelog {
278
278
git commit - m " Update CHANGELOG for `` $Version `` "
279
279
}
280
280
}
281
-
282
- Update-Version - RepositoryName $RepositoryName
283
281
}
284
282
285
283
<#
@@ -304,6 +302,7 @@ function Update-Changelog {
304
302
- `name` field has `-preview` appended similarly
305
303
- `displayName` field has ` Preview` appended similarly
306
304
- `description` field has `(Preview) ` prepended similarly
305
+ - `icon` field has `_Preview ` inserted similarly
307
306
#>
308
307
function Update-Version {
309
308
[CmdletBinding (SupportsShouldProcess )]
@@ -369,8 +368,6 @@ function Update-Version {
369
368
git commit - m " Bump version to `` v$Version `` "
370
369
} # TODO: Git reset to unstage
371
370
}
372
-
373
- New-ReleasePR - RepositoryName $RepositoryName
374
371
}
375
372
376
373
<#
@@ -416,6 +413,45 @@ function New-ReleasePR {
416
413
$Repo | Add-GitHubIssueLabel - Issue $PR.PullRequestNumber - LabelName " Ignore"
417
414
}
418
415
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
+
419
455
<#
420
456
. SYNOPSIS
421
457
Creates a new draft GitHub release and Git tag from the updated changelog.
0 commit comments