File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -145,10 +145,12 @@ function Update-Changelog {
145
145
[string ]$RepositoryName ,
146
146
147
147
[Parameter (Mandatory )]
148
- [ValidateScript ({ Test-VersionIsValid - RepositoryName $RepositoryName - Version $_ })]
149
148
[string ]$Version
150
149
)
151
150
151
+ # Since we depend on both parameters, we can't do this with `ValidateScript`.
152
+ Test-VersionIsValid - RepositoryName $RepositoryName - Version $Version
153
+
152
154
# Get the repo object, latest release, and commits since its tag.
153
155
$Repo = Get-GitHubRepository - OwnerName PowerShell - RepositoryName $RepositoryName
154
156
$Commits = Use-Repository - RepositoryName $RepositoryName - Script {
Original file line number Diff line number Diff line change 5
5
6
6
using namespace System.Management.Automation
7
7
8
- class RepoNames : IValidateSetValuesGenerator {
8
+ class RepoNames : IValidateSetValuesGenerator {
9
9
# NOTE: This is super over-engineered, but it was fun.
10
10
static [string []] $Values = " vscode-powershell" , " PowerShellEditorServices"
11
11
[String []] GetValidValues() { return [RepoNames ]::Values }
@@ -150,5 +150,4 @@ function Test-VersionIsValid {
150
150
}
151
151
}
152
152
}
153
- return $true
154
153
}
You can’t perform that action at this time.
0 commit comments