build: Update bettersqlite3 binary for macOS

This commit is contained in:
Elian Doran 2024-07-17 22:25:36 +03:00
parent d73b10d10d
commit aa6cf1f11c
No known key found for this signature in database
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
ELECTRON_VERSION=125
BETTER_SQLITE3_VERSION=11.1.2
function download() {
platform="$1"
dest_name="$2"
url=https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-electron-v${ELECTRON_VERSION}-${platform}.tar.gz
temp_file="temp.tar.gz"
curl -L "$url" -o "$temp_file"
tar -xzvf "$temp_file"
mv build/Release/better_sqlite3.node "$dest_name-better_sqlite3.node"
rm -rf build
rm -f "$temp_file"
}
download "win32-x64" "win"
download "darwin-x64" "mac-x64"
download "darwin-arm64" "mac-arm64"