Skip to content

Commit 8747eec

Browse files
committed
Refactor New-Release into New-ReleaseBundle
Where the former acts on one repository, and the latter acts on both.
1 parent 8e426fa commit 8747eec

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

tools/ReleaseTools.psm1

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function New-ReleasePR {
417417

418418
<#
419419
.SYNOPSIS
420-
Kicks off the whole release process.
420+
Kicks off the whole release process for one of the repositories.
421421
.DESCRIPTION
422422
This first updates the changelog (which creates and checks out the `release`
423423
branch), commits the changes, updates the version (and commits), pushes the
@@ -433,6 +433,28 @@ function New-ReleasePR {
433433
assets to the marketplace and gallery.
434434
#>
435435
function New-Release {
436+
[CmdletBinding(SupportsShouldProcess)]
437+
param(
438+
[Parameter(Mandatory)]
439+
[ValidateSet([RepoNames])]
440+
[string]$RepositoryName,
441+
442+
[Parameter(Mandatory)]
443+
[ValidateScript({ $_.StartsWith("v") })]
444+
[string]$Version
445+
)
446+
Update-Changelog -RepositoryName $RepositoryName -Version $Version
447+
Update-Version -RepositoryName $RepositoryName
448+
New-ReleasePR -RepositoryName $RepositoryName
449+
}
450+
451+
<#
452+
.SYNOPSIS
453+
Kicks off the whole release process for both repositories.
454+
.DESCRIPTION
455+
This just simplifies the calling of `New-Release` for both repositories.
456+
#>
457+
function New-ReleaseBundle {
436458
[CmdletBinding(SupportsShouldProcess)]
437459
param(
438460
[Parameter(Mandatory)]
@@ -448,9 +470,7 @@ function New-Release {
448470
"PowerShellEditorServices" { $PsesVersion }
449471
"vscode-powershell" { $VsceVersion }
450472
}
451-
Update-Changelog -RepositoryName $_ -Version $Version
452-
Update-Version -RepositoryName $_
453-
New-ReleasePR -RepositoryName $_
473+
New-Release -RepositoryName $_ -Version $Version
454474
}
455475
}
456476

0 commit comments

Comments
 (0)