Skip to content

Build your personal knowledge base with Trilium Notes

build: Update bettersqlite3 binary for macOS

Elian Doranaa6cf1f11cae
diff --git a/bin/better-sqlite3/mac-arm64-better_sqlite3.node b/bin/better-sqlite3/mac-arm64-better_sqlite3.node
index 9709dcd23b..3eadd64bca 100644
Binary files a/bin/better-sqlite3/mac-arm64-better_sqlite3.node and b/bin/better-sqlite3/mac-arm64-better_sqlite3.node differ
diff --git a/bin/better-sqlite3/mac-x64-better_sqlite3.node b/bin/better-sqlite3/mac-x64-better_sqlite3.node
index 70835a3f86..0bb7c6a567 100644
Binary files a/bin/better-sqlite3/mac-x64-better_sqlite3.node and b/bin/better-sqlite3/mac-x64-better_sqlite3.node differ
diff --git a/bin/better-sqlite3/update.sh b/bin/better-sqlite3/update.sh
new file mode 100644
index 0000000000..3380979dd6
--- /dev/null
+++ b/bin/better-sqlite3/update.sh
@@ -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"
\ No newline at end of file