2018-12-02 07:26:45 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
BUILD_DIR=./dist/trilium-linux-x64
|
|
|
|
rm -rf $BUILD_DIR
|
|
|
|
|
2019-01-13 02:48:45 +08:00
|
|
|
rm -r node_modules/sqlite3/lib/binding/*
|
|
|
|
|
|
|
|
cp -r bin/deps/linux-x64/sqlite/* node_modules/sqlite3/lib/binding/
|
2018-12-02 07:26:45 +08:00
|
|
|
|
2019-01-12 07:05:13 +08:00
|
|
|
./node_modules/.bin/electron-packager . --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite
|
2018-12-02 07:26:45 +08:00
|
|
|
|
|
|
|
mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR
|
|
|
|
|
2019-01-23 02:49:33 +08:00
|
|
|
cp src/public/images/app-icons/png/128x128.png $BUILD_DIR/icon.png
|
|
|
|
|
2018-12-02 07:26:45 +08:00
|
|
|
# removing software WebGL binaries because they are pretty huge and not necessary
|
|
|
|
rm -r $BUILD_DIR/swiftshader
|
|
|
|
|
|
|
|
echo "Packaging linux x64 electron distribution..."
|
|
|
|
VERSION=`jq -r ".version" package.json`
|
2019-01-13 02:48:45 +08:00
|
|
|
|
2019-01-17 06:57:09 +08:00
|
|
|
cd dist
|
|
|
|
|
|
|
|
tar cJf trilium-linux-x64-${VERSION}.tar.xz trilium-linux-x64
|