Last active
February 26, 2016 15:17
-
-
Save Geertvdc/d6a9825bf97d96ea57c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment