fix: windows build script (#638)

This commit is contained in:
yetone 2024-09-26 11:44:48 +08:00 committed by GitHub
parent 67adc263ad
commit 272b60f050
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,12 +35,16 @@ function Download-Prebuilt($feature) {
# Set the platform to Windows
$PLATFORM = "windows"
$ARCH = "x86_64"
if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
$ARCH = "aarch64"
}
# Set the Lua version (lua51 or luajit)
$LUA_VERSION = if ($feature) { $feature } else { "luajit" }
# Set the artifact name pattern
$ARTIFACT_NAME_PATTERN = "avante_lib-$PLATFORM-latest-$LUA_VERSION"
$ARTIFACT_NAME_PATTERN = "avante_lib-$PLATFORM-$ARCH-$LUA_VERSION"
# Get the artifact download URL
$LATEST_RELEASE = Invoke-RestMethod -Uri "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest"