Move electron build script to /tools/

Also enables bash strict mode flags for the build script
This commit is contained in:
Martin Fournier
2022-03-23 06:17:50 -04:00
parent 452ee3da7f
commit cec5f1ce29
2 changed files with 3 additions and 1 deletions

22
tools/package-electron.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -euxo pipefail
# Clear out any files remaining from old builds
rm -rf .package
mkdir -p .package/dist/ || true
cp index.html .package
cp favicon.ico .package
cp -r electron/* .package
cp -r dist .package
# Install electron sub-dependencies
cd electron
npm install
cd ..
BUILD_PLATFORM="${1:-"all"}"
# And finally build the app.
npm run electron:packager-$BUILD_PLATFORM