From 58c4daafe268a6a551b872e8d7c7c9e4adcd1f23 Mon Sep 17 00:00:00 2001 From: nil4 Date: Fri, 1 Nov 2024 13:45:04 +0100 Subject: [PATCH] [win] fix Swift version detection --- Bindings/dotnet/nuget-pack-native.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bindings/dotnet/nuget-pack-native.ps1 b/Bindings/dotnet/nuget-pack-native.ps1 index 62a4e017..481fd642 100755 --- a/Bindings/dotnet/nuget-pack-native.ps1 +++ b/Bindings/dotnet/nuget-pack-native.ps1 @@ -19,7 +19,7 @@ exec { dotnet build --configuration $CONFIGURATION $DEMO_DIR } $NATIVE_DIR = Join-Path $REPO_ROOT 'Bindings/dotnet/RoyalApps.RoyalVNCKit.native' -Resolve $NUSPEC_FILE = Join-Path $NATIVE_DIR 'native.nuspec' -Resolve -if ($HOST_OS -eq "win") { +if ($HOST_OS -eq 'windows') { $NUSPEC_FILE = Join-Path $NATIVE_DIR 'windows.nuspec' -Resolve $SWIFT_CRT_PATH = (Get-Command swiftCRT.dll -ErrorAction Stop).Source @@ -29,7 +29,7 @@ if ($HOST_OS -eq "win") { $NUGET_SWIFT_RT_VERSION = $env:NUGET_SWIFT_RT_VERSION if (-not $NUGET_SWIFT_RT_VERSION) { [string]$version = (& swift --version) - if ($version -imatch 'Swift version (\d+\.\d+(\.d+)?)') { + if ($version -imatch 'Swift version (\d+\.\d+(\.\d+)?)') { $NUGET_SWIFT_RT_VERSION = $Matches.1 Write-Host "Auto-detected NUGET_SWIFT_RT_VERSION: ${NUGET_SWIFT_RT_VERSION}" }