Skip to content

Commit

Permalink
Merge branch 'feature/update_bettersqlite3' into feature/windows_theme
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jul 21, 2024
2 parents fd8c70f + 043313c commit 01c3c6d
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 31 deletions.
Binary file modified bin/better-sqlite3/linux-desktop-better_sqlite3.node
100644 → 100755
Binary file not shown.
Binary file modified bin/better-sqlite3/linux-server-better_sqlite3.node
100644 → 100755
Binary file not shown.
Binary file modified bin/better-sqlite3/mac-arm64-better_sqlite3.node
100644 → 100755
Binary file not shown.
Binary file modified bin/better-sqlite3/mac-x64-better_sqlite3.node
100644 → 100755
Binary file not shown.
38 changes: 38 additions & 0 deletions bin/better-sqlite3/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
ELECTRON_VERSION="electron-v125"
NODE_VERSION="node-v115"

if ! command -v jq &> /dev/null; then
echo "Missing command: jq"
exit 1
fi

script_dir=$(realpath $(dirname $0))
cd "$script_dir"
BETTER_SQLITE3_VERSION=$(jq -r '.dependencies.["better-sqlite3"]' ../../package.json | grep -oP "\d+\.\d+\.\d+")

if [ -z $BETTER_SQLITE3_VERSION ]; then
echo "Unable to determine better-sqlite3 version."
exit 2
fi

echo "Version: $BETTER_SQLITE3_VERSION"

function download() {
version="$1"
platform="$2"
dest_name="$3"
url=https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-${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 $NODE_VERSION "linux-x64" "linux-server"
download $ELECTRON_VERSION "linux-x64" "linux-desktop"
download $ELECTRON_VERSION "win32-x64" "win"
download $ELECTRON_VERSION "darwin-x64" "mac-x64"
download $ELECTRON_VERSION "darwin-arm64" "mac-arm64"
Binary file modified bin/better-sqlite3/win-better_sqlite3.node
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/build-linux-x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ pushd dist
tar cJf "trilium-linux-x64-${VERSION}.tar.xz" trilium-linux-x64
popd

bin/build-debian.sh
#bin/build-debian.sh
46 changes: 19 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"archiver": "^7.0.1",
"async-mutex": "^0.5.0",
"axios": "^1.7.2",
"better-sqlite3": "8.5.0",
"better-sqlite3": "^11.1.2",
"boxicons": "2.1.4",
"chokidar": "3.6.0",
"cls-hooked": "4.2.2",
Expand Down Expand Up @@ -92,7 +92,7 @@
"mermaid": "^10.9.1",
"mime-types": "2.1.35",
"multer": "1.4.5-lts.1",
"node-abi": "3.56.0",
"node-abi": "^3.65.0",
"normalize-strings": "1.1.1",
"panzoom": "9.4.3",
"print-this": "2.0.0",
Expand Down Expand Up @@ -150,7 +150,7 @@
"@types/ws": "^8.5.10",
"@types/xml2js": "^0.4.14",
"cross-env": "7.0.3",
"electron": "25.9.8",
"electron": "^31.2.1",
"electron-packager": "17.1.2",
"electron-rebuild": "3.2.9",
"esm": "3.2.25",
Expand Down

0 comments on commit 01c3c6d

Please sign in to comment.