Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (19 sloc) 697 Bytes
Param(
[String]$projectFolder,
[String]$buildId
)
if (-Not $projectfolder) {
Write-Host "no project folder set"
exit 1
}
if (-Not $buildId) {
Write-Host "no build Id set"
exit 1
}
$manifestfile = Get-Item -Path "$projectFolder\Package.appxmanifest"
$manifestXml = New-Object -TypeName System.Xml.XmlDocument
$manifestXml.Load($manifestfile.Fullname)
$currentVersion = [Version]$manifestXml.Package.Identity.Version
$updatedVersion = [Version]($currentVersion.Major.ToString() + '.' + $currentVersion.Minor + '.' + $currentVersion.Build + '.' + $buildId)
$manifestXml.Package.Identity.Version = [String]$updatedVersion
$manifestXml.save($manifestfile.FullName)