mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-11 12:06:44 +00:00
add parsers
This commit is contained in:
@@ -1,17 +1,3 @@
|
||||
function Validate-FiltersFormat {
|
||||
param (
|
||||
[Parameter(Mandatory)] [string[]] $Filters
|
||||
)
|
||||
|
||||
foreach($filter in $Filters) {
|
||||
$filter.Split('.') | ForEach-Object {
|
||||
if (($_ -notmatch '^\d+$') -and ($_ -ne '*')) {
|
||||
throw "Invalid filter format - $filter"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Format-Versions {
|
||||
param (
|
||||
[Parameter(Mandatory)] [string[]] $Versions
|
||||
|
||||
Reference in New Issue
Block a user