Skip to content

Get-PodeVersion

SYNOPSIS

Gets the version of the Pode module.

SYNTAX

Get-PodeVersion

DESCRIPTION

The Get-PodeVersion function checks the version of the Pode module specified in the module manifest. If the module version is not a placeholder value ('$version$'), it returns the actual version prefixed with 'v.'. If the module version is the placeholder value, indicating the development branch, it returns '[develop branch]'.

EXAMPLES

EXAMPLE 1

$moduleManifest = @{ ModuleVersion = '1.2.3' }
PS> Get-PodeVersion

Returns 'v1.2.3'.

EXAMPLE 2

$moduleManifest = @{ ModuleVersion = '$version$' }
PS> Get-PodeVersion

Returns '[dev]'.

PARAMETERS

INPUTS

OUTPUTS

System.String

Returns a string indicating the version of the Pode module or '[dev]' if on a development version.

NOTES

This function assumes that $moduleManifest is a hashtable representing the loaded module manifest, with a key of ModuleVersion.