File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change 55
66using 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}
You can’t perform that action at this time.
0 commit comments