Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 48cf41b

Browse files
authored
Merge pull request #243 from TriliumNext/feature/server_esm_part3
Server ESM port: Getting things to run
2 parents 1a5649e + 7b2d70b commit 48cf41b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+435
-229
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- 'develop'
66
- 'feature/update*'
7+
- 'feature/server_esm*'
78
paths-ignore:
89
- 'docs/**'
910

bin/better-sqlite3/linux-desktop-better_sqlite3.node

100644100755
85.3 KB
Binary file not shown.

bin/better-sqlite3/linux-server-better_sqlite3.node

100644100755
89.2 KB
Binary file not shown.

bin/better-sqlite3/mac-arm64-better_sqlite3.node

100644100755
67.9 KB
Binary file not shown.

bin/better-sqlite3/mac-x64-better_sqlite3.node

100644100755
-160 KB
Binary file not shown.

bin/better-sqlite3/update.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
ELECTRON_VERSION="electron-v125"
3+
NODE_VERSION="node-v115"
4+
5+
if ! command -v jq &> /dev/null; then
6+
echo "Missing command: jq"
7+
exit 1
8+
fi
9+
10+
script_dir=$(realpath $(dirname $0))
11+
cd "$script_dir"
12+
BETTER_SQLITE3_VERSION=$(jq -r '.dependencies.["better-sqlite3"]' ../../package.json | grep -oP "\d+\.\d+\.\d+")
13+
14+
if [ -z $BETTER_SQLITE3_VERSION ]; then
15+
echo "Unable to determine better-sqlite3 version."
16+
exit 2
17+
fi
18+
19+
echo "Version: $BETTER_SQLITE3_VERSION"
20+
21+
function download() {
22+
version="$1"
23+
platform="$2"
24+
dest_name="$3"
25+
url=https://github.com/WiseLibs/better-sqlite3/releases/download/v${BETTER_SQLITE3_VERSION}/better-sqlite3-v${BETTER_SQLITE3_VERSION}-${version}-${platform}.tar.gz
26+
temp_file="temp.tar.gz"
27+
curl -L "$url" -o "$temp_file"
28+
tar -xzvf "$temp_file"
29+
mv build/Release/better_sqlite3.node "$dest_name-better_sqlite3.node"
30+
rm -rf build
31+
rm -f "$temp_file"
32+
}
33+
34+
download $NODE_VERSION "linux-x64" "linux-server"
35+
download $ELECTRON_VERSION "linux-x64" "linux-desktop"
36+
download $ELECTRON_VERSION "win32-x64" "win"
37+
download $ELECTRON_VERSION "darwin-x64" "mac-x64"
38+
download $ELECTRON_VERSION "darwin-arm64" "mac-arm64"
-76 KB
Binary file not shown.

bin/build-debian.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e # Fail on any command error
4+
35
if ! command -v dpkg-deb &> /dev/null; then
46
echo "Missing command: dpkg-deb"
57
exit 1

bin/build-docker.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e # Fail on any command error
4+
35
VERSION=`jq -r ".version" package.json`
46
SERIES=${VERSION:0:4}-latest
57

bin/build-linux-x64.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e # Fail on any command error
4+
35
if ! command -v jq &> /dev/null; then
46
echo "Missing command: jq"
57
exit 1
@@ -24,8 +26,6 @@ SRC_DIR=./dist/trilium-linux-x64-src
2426

2527
[ "$1" != "DONTCOPY" ] && ./bin/copy-trilium.sh "$SRC_DIR"
2628

27-
rm -r "$SRC_DIR"/src/public/app-dist/*.mobile.*
28-
2929
echo "Copying required linux-x64 binaries"
3030
cp -r bin/better-sqlite3/linux-desktop-better_sqlite3.node "$SRC_DIR"/node_modules/better-sqlite3/build/Release/better_sqlite3.node
3131

@@ -55,4 +55,4 @@ pushd dist
5555
tar cJf "trilium-linux-x64-${VERSION}.tar.xz" trilium-linux-x64
5656
popd
5757

58-
bin/build-debian.sh
58+
#bin/build-debian.sh

0 commit comments

Comments
 (0)