Get-MFLatestSemverFromBuildManifest

SYNOPSIS

Read the current module version from the compiled manifest in the build folder, returned as a semver object

SYNTAX

All parameter sets

Get-MFLatestSemverFromBuildManifest [[-ModulePath] <string>] [[-ConfigFile] <string>]
 [[-ModuleNameOverride] <string>]

ALIASES

This cmdlet has the following aliases,

DESCRIPTION

Reads the compiled module manifest from the build folder and returns the current version as a semver object. Useful when building locally and needing to determine the current version before calculating the next one. Supports an optional module name override for cases where the config file is unavailable.


EXAMPLES

EXAMPLE 1

Get-MFLatestSemverFromBuildManifest

DESCRIPTION

Import build\module\modulemanifest.psd1 Find the prerelease tag(if present) and module version. I.e. module version 1.1.0 prerelease tag prev003 = 1.1.0-prev003

OUTPUT

Major Minor Patch PreReleaseLabel BuildLabel —– —– —– ————— ———- 1 1 0 prev003

PARAMETERS

-ConfigFile

Name of the ModuleForge config file. Defaults to ‘moduleForgeConfig.xml’

Type: System.String
DefaultValue: moduleForgeConfig.xml
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ModuleNameOverride

Override the module name from config. Useful when the config file is unavailable and the module name is already known

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ModulePath

Root path of the module. Uses the current working directory by default

Type: System.String
DefaultValue: $(get-location).path
SupportsWildcards: false
Aliases:
- Path
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

[semver] - Returns a Semantic Version object

System.Management.Automation.SemanticVersion

NOTES

Author: Adrian Andersson