Get-SemVerFromString
SYNOPSIS
Private function to parse a string to a SemVer 2.0 custom object, but with added Revision number common to .Net world (and Choco Packages)
SYNTAX
Get-SemVerFromString [[-VersionString] <String>] [<CommonParameters>]
DESCRIPTION
This function parses the string of a version into an object composed of a [System.Version] object (Major, Minor, Patch, Revision) plus the pre-release identifiers and Build Metadata. The PreRelease metadata is also made available as an array to ease the version comparison.
EXAMPLES
EXAMPLE 1
Get-SemVerFromString -VersionString '1.6.24.256-rc1+01012018'
EXAMPLE 2
Get-SemVerFromString -VersionString '1.6-alpha.13.24.15'
PARAMETERS
-VersionString
String representation of the Version to Parse.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Management.Automation.PSObject
NOTES
The function returns a PSObject of PSTypeName Package.Version