Skip to content

Commit 09199cf

Browse files
committed
Fix project version property in PS scripts
1 parent ca7e910 commit 09199cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/package.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (-Not (Get-Command msbuild -ErrorAction SilentlyContinue)) {
66
Set-Location "$(Split-Path $MyInvocation.MyCommand.Path)\.."
77

88
$appPlatforms = if ($args) { $args } else { @("x86", "x64", "arm64") }
9-
$appVersion = ([Xml](Get-Content -Path "src\WinDynamicDesktop.csproj")).Project.PropertyGroup.Version
9+
$appVersion = ([Xml](Get-Content -Path "src\WinDynamicDesktop.csproj")).Project.PropertyGroup[0].Version
1010

1111
Remove-Item "dist" -ErrorAction Ignore -Recurse
1212
New-Item -ItemType Directory -Force -Path "dist"

scripts/version.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $appxmanifest = "uwp\Package.appxmanifest"
66
$csproj = "src\WinDynamicDesktop.csproj"
77

88
$xmlDoc = [XML](Get-Content -Path $csproj)
9-
$oldVersion = $xmlDoc.Project.PropertyGroup.Version
9+
$oldVersion = $xmlDoc.Project.PropertyGroup[0].Version
1010

1111
if (!$newVersion) {
1212
$newVersion = "$oldVersion-g$(git rev-parse --short HEAD)"
@@ -15,7 +15,7 @@ if (!$newVersion) {
1515
exit
1616
}
1717

18-
$xmlDoc.Project.PropertyGroup.Version = $newVersion
18+
$xmlDoc.Project.PropertyGroup[0].Version = $newVersion
1919
$xmlDoc.Save("$pwd\$csproj")
2020

2121
$xmlDoc = [XML](Get-Content -Path $appxmanifest)

0 commit comments

Comments
 (0)