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 {
339339 are prefixed with a `v`. Creates a Git tag if it does not already exist.
340340#>
341341function New-DraftRelease {
342- [CmdletBinding (SupportsShouldProcess )]
343342 param (
344343 [Parameter (Mandatory )]
345344 [ValidateSet ([RepoNames ])]
@@ -349,23 +348,12 @@ function New-DraftRelease {
349348 $Changelog = (Get-FirstChangelog - RepositoryName $RepositoryName ) -join " `n "
350349 $ReleaseParams = @ {
351350 Draft = $true
351+ # NOTE: We rely on GitHub to create the tag at that branch.
352352 Tag = " v$Version "
353353 Committish = " release/v$Version "
354354 Name = " v$Version "
355355 Body = $ChangeLog
356356 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
369357 }
370358
371359 Get-GitHubRepository - OwnerName PowerShell - RepositoryName $RepositoryName |
You can’t perform that action at this time.
0 commit comments