ci: move version output after variable definition

This commit is contained in:
Bryan Lee
2025-01-09 10:31:41 +08:00
parent bec690532d
commit 37256ec6a2

View File

@ -247,10 +247,10 @@ jobs:
run: | run: |
# Get the zig version from build.zig so that it only needs to be updated # Get the zig version from build.zig so that it only needs to be updated
$fileContent = Get-Content -Path "build.zig" -Raw $fileContent = Get-Content -Path "build.zig" -Raw
$pattern = 'buildpkg\.requireZig\("(.*?)"\)' $pattern = 'buildpkg\.requireZig\("(.*?)"\);'
$zigVersion = [regex]::Match($fileContent, $pattern).Groups[1].Value $zigVersion = [regex]::Match($fileContent, $pattern).Groups[1].Value
Write-Output $version
$version = "zig-windows-x86_64-$zigVersion" $version = "zig-windows-x86_64-$zigVersion"
Write-Output $version
$uri = "https://ziglang.org/download/$zigVersion/$version.zip" $uri = "https://ziglang.org/download/$zigVersion/$version.zip"
Invoke-WebRequest -Uri "$uri" -OutFile ".\zig-windows.zip" Invoke-WebRequest -Uri "$uri" -OutFile ".\zig-windows.zip"
Expand-Archive -Path ".\zig-windows.zip" -DestinationPath ".\" -Force Expand-Archive -Path ".\zig-windows.zip" -DestinationPath ".\" -Force