fix(release): supports darwin x86_64 (#637)
This commit is contained in:
23
build.sh
23
build.sh
@@ -11,10 +11,10 @@ TARGET_DIR="${SCRIPT_DIR}/build"
|
||||
# Get the artifact download URL based on the platform and Lua version
|
||||
case "$(uname -s)" in
|
||||
Linux*)
|
||||
PLATFORM="ubuntu"
|
||||
PLATFORM="linux"
|
||||
;;
|
||||
Darwin*)
|
||||
PLATFORM="macos"
|
||||
PLATFORM="darwin"
|
||||
;;
|
||||
CYGWIN* | MINGW* | MSYS*)
|
||||
PLATFORM="windows"
|
||||
@@ -25,11 +25,28 @@ CYGWIN* | MINGW* | MSYS*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the architecture (x86_64 or aarch64)
|
||||
case "$(uname -m)" in
|
||||
x86_64)
|
||||
ARCH="x86_64"
|
||||
;;
|
||||
aarch64)
|
||||
ARCH="aarch64"
|
||||
;;
|
||||
arm64)
|
||||
ARCH="aarch64"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set the Lua version (lua54 or luajit)
|
||||
LUA_VERSION="${LUA_VERSION:-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
|
||||
ARTIFACT_URL=$(curl -s "https://api.github.com/repos/yetone/avante.nvim/releases/latest" | grep "browser_download_url" | cut -d '"' -f 4 | grep $ARTIFACT_NAME_PATTERN)
|
||||
|
||||
Reference in New Issue
Block a user