Skip to content

Commit 619dc1f

Browse files
committed
Address feedback
1 parent fc9bdd6 commit 619dc1f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/ReleaseTools.psm1

+3-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ function Update-Changelog {
145145
[string]$RepositoryName,
146146

147147
[Parameter(Mandatory)]
148-
[ValidateScript({ Test-VersionIsValid -RepositoryName $RepositoryName -Version $_ })]
149148
[string]$Version
150149
)
151150

151+
# Since we depend on both parameters, we can't do this with `ValidateScript`.
152+
Test-VersionIsValid -RepositoryName $RepositoryName -Version $Version
153+
152154
# Get the repo object, latest release, and commits since its tag.
153155
$Repo = Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName
154156
$Commits = Use-Repository -RepositoryName $RepositoryName -Script {

tools/VersionTools.psm1

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
using namespace System.Management.Automation
77

8-
class RepoNames: IValidateSetValuesGenerator {
8+
class RepoNames : IValidateSetValuesGenerator {
99
# NOTE: This is super over-engineered, but it was fun.
1010
static [string[]] $Values = "vscode-powershell", "PowerShellEditorServices"
1111
[String[]] GetValidValues() { return [RepoNames]::Values }
@@ -150,5 +150,4 @@ function Test-VersionIsValid {
150150
}
151151
}
152152
}
153-
return $true
154153
}

0 commit comments

Comments
 (0)