Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (14 sloc) 536 Bytes
Param(
[string]$newVersion
)
$file = "$PSScriptRoot\Templates\HomeSeerTemplates\source.extension.vsixmanifest"
[xml]$xml = get-content -Path $file
if ($newVersion -eq "") {
$version = [System.Version]::Parse($xml.PackageManifest.Metadata.Identity.Version)
$newVersion = "$($version.Major).$($version.Minor).$($version.Build + 1)"
} else {
$newVersion = $newVersion -replace "(\d*\.\d*\.\d*).*", "`$1"
}
$xml.PackageManifest.Metadata.Identity.Version = $newVersion
$xml.Save($file)
"Updated $file to $newVersion "