File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,6 @@ function Update-Version {
339
339
are prefixed with a `v`. Creates a Git tag if it does not already exist.
340
340
#>
341
341
function New-DraftRelease {
342
- [CmdletBinding (SupportsShouldProcess )]
343
342
param (
344
343
[Parameter (Mandatory )]
345
344
[ValidateSet ([RepoNames ])]
@@ -349,23 +348,12 @@ function New-DraftRelease {
349
348
$Changelog = (Get-FirstChangelog - RepositoryName $RepositoryName ) -join " `n "
350
349
$ReleaseParams = @ {
351
350
Draft = $true
351
+ # NOTE: We rely on GitHub to create the tag at that branch.
352
352
Tag = " v$Version "
353
353
Committish = " release/v$Version "
354
354
Name = " v$Version "
355
355
Body = $ChangeLog
356
356
PreRelease = [bool ]$Version.PreReleaseLabel
357
- # TODO: Pass -WhatIf and -Confirm parameters correctly.
358
- }
359
-
360
- if ($PSCmdlet.ShouldProcess (" $RepositoryName /v$Version " , " git tag" )) {
361
- # NOTE: This a side effect neccesary for Git operations to work.
362
- Push-Location - Path " $PSScriptRoot /../../$RepositoryName "
363
- if (-not (git show-ref -- tags " v$Version " )) {
364
- git tag " v$Version "
365
- } else {
366
- Write-Warning " git tag $RepositoryName /v$Version already exists!"
367
- }
368
- Pop-Location
369
357
}
370
358
371
359
Get-GitHubRepository - OwnerName PowerShell - RepositoryName $RepositoryName |
You can’t perform that action at this time.
0 commit comments