Skip to content

Commit

Permalink
[win] fix Swift version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
nil4 committed Nov 1, 2024
1 parent b32b58c commit 58c4daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bindings/dotnet/nuget-pack-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
}
Expand Down

0 comments on commit 58c4daa

Please sign in to comment.