1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-29 16:17:52 +01:00
blowfish/scripts/release-prepare.sh

19 lines
808 B
Bash
Raw Normal View History

2019-11-10 16:49:57 +01:00
#!/bin/bash
2020-02-09 19:39:38 +01:00
rm -rf {dist,build,src/renderer/.next,src/renderer/out}/ && \
2020-02-09 03:36:19 +01:00
npm run build:react && \
npm run build:electron && \
2019-11-10 16:49:57 +01:00
if [ -x "$(command -v docker)" ]; then
docker run --rm \
2019-11-10 16:49:57 +01:00
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
2020-02-09 19:39:38 +01:00
/bin/bash -c "npm i && npm run build:react && npm run build:electron:win"
2019-11-10 16:49:57 +01:00
fi