refactor: move script to update client build into electron package

This commit is contained in:
Tom French
2022-07-03 23:45:38 +01:00
parent 1a4b46cb6c
commit da62f9b5d9
3 changed files with 18 additions and 9 deletions

View File

@@ -89,15 +89,10 @@ yarn workspace loot-core build:node
yarn workspace @actual-app/web build
rm -fr packages/desktop-electron/client-build
cp -r packages/desktop-client/build packages/desktop-electron/client-build
# Remove the embedded backend for the browser version. Will improve
# this process
rm -fr packages/desktop-electron/client-build/data
rm -fr packages/desktop-electron/client-build/*kcab.*
rm -fr packages/desktop-electron/client-build/*.wasm
rm -fr packages/desktop-electron/client-build/*.map
(
cd packages/desktop-electron;
yarn update-client
)
if [ -n "$RELEASE" ]; then
SENTRY_CLI="./packages/desktop-electron/node_modules/.bin/sentry-cli"

View File

@@ -0,0 +1,13 @@
#!/bin/bash -e
ROOT=`dirname $0`
rm -rf ${ROOT}/../client-build
cp -r ${ROOT}/../../desktop-client/build ${ROOT}/../client-build
# Remove the embedded backend for the browser version. Will improve
# this process
rm -rf ${ROOT}/../client-build/data
rm -rf ${ROOT}/../client-build/*kcab.*
rm -rf ${ROOT}/../client-build/*.wasm
rm -rf ${ROOT}/../client-build/*.map

View File

@@ -6,6 +6,7 @@
"version": "4.0.2",
"scripts": {
"clean": "rm -rf dist",
"update-client": "bin/update-client",
"build": "electron-builder",
"watch": "cross-env ACTUAL_DOCUMENT_DIR=\"../../data\" ACTUAL_DATA_DIR=\"../../data\" electron ."
},