#
# Use a file "version.txt" in root of project to determine the name of the next release
#

$fileVer = "$PSScriptRoot/../version.txt"

if (-Not (Test-Path $fileVer -PathType Leaf)) {
    Write-Output 'version.txt not present in project root'
    exit
}

$versionLocal = (Get-Content -Path $fileVer).trim()

$Global:version = $versionLocal -replace '\.\d{1,2}$',''

Write-Host "Version Detected`t| $version"

if (-not($version -eq $versionLocal))
{
	Write-Host "Patch Detected  `t| $versionLocal"
}
