Skip to content

Commit ba7ce2d

Browse files
committed
Don't create tag locally
1 parent 8f0d18a commit ba7ce2d

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

tools/ReleaseTools.psm1

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff 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
#>
341341
function 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 |

0 commit comments

Comments
 (0)