From 5260689b8eb3033c85b0f11cbe215ed5f7d0f342 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 12 Feb 2022 22:51:28 +0100 Subject: [PATCH] include "dump-db" into released artifacts --- .gitpod.yml | 2 +- Dockerfile | 2 +- bin/build-linux-x64.sh | 2 ++ bin/build-mac-x64.sh | 2 ++ bin/build-server.sh | 4 +++- bin/build-win-x64.sh | 2 ++ bin/copy-trilium.sh | 7 +++++-- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 03a98ff18..faafd9f57 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,7 +2,7 @@ image: file: .gitpod.dockerfile tasks: - - before: nvm install 16.13.2 && nvm use 16.13.2 + - before: nvm install 16.14.0 && nvm use 16.14.0 init: npm install command: npm run start-server diff --git a/Dockerfile b/Dockerfile index ed3dead90..cb47e0c7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.13.2-alpine +FROM node:16.14.0-alpine # Create app directory WORKDIR /usr/src/app diff --git a/bin/build-linux-x64.sh b/bin/build-linux-x64.sh index d46f58640..68d67a8b5 100755 --- a/bin/build-linux-x64.sh +++ b/bin/build-linux-x64.sh @@ -29,6 +29,8 @@ rm -r $BUILD_DIR/swiftshader cp bin/tpl/anonymize-database.sql $BUILD_DIR/ +cp -r dump-db $BUILD_DIR/ + cp bin/tpl/trilium-portable.sh $BUILD_DIR/ chmod 755 $BUILD_DIR/trilium-portable.sh diff --git a/bin/build-mac-x64.sh b/bin/build-mac-x64.sh index 2cc111339..fd16cc2a2 100755 --- a/bin/build-mac-x64.sh +++ b/bin/build-mac-x64.sh @@ -25,6 +25,8 @@ mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR cp bin/tpl/anonymize-database.sql $BUILD_DIR/ +cp -r dump-db $BUILD_DIR/ + echo "Zipping mac x64 electron distribution..." VERSION=`jq -r ".version" package.json` diff --git a/bin/build-server.sh b/bin/build-server.sh index 1e62d8aa0..522c9faad 100755 --- a/bin/build-server.sh +++ b/bin/build-server.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash PKG_DIR=dist/trilium-linux-x64-server -NODE_VERSION=16.13.2 +NODE_VERSION=16.14.0 if [ "$1" != "DONTCOPY" ] then @@ -30,6 +30,8 @@ chmod 755 $PKG_DIR/trilium.sh cp bin/tpl/anonymize-database.sql $PKG_DIR/ +cp -r dump-db $PKG_DIR/ + VERSION=`jq -r ".version" package.json` cd dist diff --git a/bin/build-win-x64.sh b/bin/build-win-x64.sh index c1b8030e4..0f7040a04 100755 --- a/bin/build-win-x64.sh +++ b/bin/build-win-x64.sh @@ -27,6 +27,8 @@ rm -r $BUILD_DIR/swiftshader cp bin/tpl/anonymize-database.sql $BUILD_DIR/ +cp -r dump-db $BUILD_DIR/ + cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/ echo "Zipping windows x64 electron distribution..." diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.sh index e66026c22..d9831c683 100755 --- a/bin/copy-trilium.sh +++ b/bin/copy-trilium.sh @@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then exit 1 fi -n exec 16.13.2 npm run webpack +n exec 16.14.0 npm run webpack DIR=$1 @@ -14,6 +14,9 @@ mkdir $DIR echo "Copying Trilium to build directory $DIR" +cp -r dump-db $DIR/ +rm -rf $DIR/dump-db/node_modules + cp -r images $DIR/ cp -r libraries $DIR/ cp -r src $DIR/ @@ -27,7 +30,7 @@ cp -r electron.js $DIR/ cp webpack-* $DIR/ # run in subshell (so we return to original dir) -(cd $DIR && n exec 16.13.2 npm install --only=prod) +(cd $DIR && n exec 16.14.0 npm install --only=prod) # cleanup of useless files in dependencies rm -r $DIR/node_modules/image-q/demo