-
Notifications
You must be signed in to change notification settings - Fork 43
Split ModuleVersion
Parse a SemVer2 Version string.
Split-ModuleVersion [[-ModuleVersion] <String>] [<CommonParameters>]
This function parses a SemVer (semver.org) version string into an object with the following properties:
- Version: The version without tag or metadata, as used by folder versioning in PowerShell modules.
- PreReleaseString: A Publish-Module compliant prerelease tag (see below).
- ModuleVersion: The Version and Prerelease tag compliant with Publish-Module.
For instance, this is a valid SemVer: 1.15.0-pr0224-0022+Sha.47ae45eb2cfed02b249f239a7c55e5c71b26ab76.Date.2020-01-07
The Metadata is stripped: 1.15.0-pr0224-0022
The Version is 1.15.0
.
The prerelease tag is -pr0224-0022
However, Publish-Module (or NuGet/PSGallery) does not support such pre-release,
so this function only keep the first part -pr0224
Split-ModuleVersion -ModuleVersion '1.15.0-pr0224-0022+Sha.47ae45eb2cfed02b249f239a7c55e5c71b26ab76.Date.2020-01-07'
Full SemVer version string with (optional) metadata and prerelease tag to be parsed.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Add Sample
- Convert SamplerHashtableToString
- Get BuiltModuleVersion
- Get ClassBasedResourceName
- Get CodeCoverageThreshold
- Get MofSchemaName
- Get OperatingSystemShortName
- Get PesterOutputFileFileName
- Get Psm1SchemaName
- Get SamplerAbsolutePath
- Get SamplerBuildVersion
- Get SamplerBuiltModuleBase
- Get SamplerBuiltModuleManifest
- Get SamplerCodeCoverageOutputFile
- Get SamplerCodeCoverageOutputFileEncoding
- Get SamplerModuleInfo
- Get SamplerModuleRootPath
- Get SamplerProjectName
- Get SamplerSourcePath
- Invoke SamplerGit
- Merge JaCoCoReport
- New SampleModule
- New SamplerJaCoCoDocument
- New SamplerPipeline
- Out SamplerXml
- Set SamplerPSModulePath
- Split ModuleVersion
- Update JaCoCoStatistic