From 5043435474d782433df2e2a2bdba060ea67db6c5 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 22 Aug 2020 01:49:05 +0200 Subject: [PATCH] build tweaks --- package.json | 3 ++- scripts/release-prepare.sh | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index e173a04..e484c0d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "lint": "eslint --ignore-path .gitignore ./src/**/*.{js,jsx} && stylelint --ignore-path .gitignore ./src/**/*.{css,scss}", "copy:icons": "copy 'src/renderer/images/icon*' build/", "build:react": "cross-env NODE_ENV=production next build src/renderer && next export src/renderer && npm run copy:icons", - "build:electron": "electron-builder build -ml -p never", + "build:electron:mac": "electron-builder build -m -p never", + "build:electron:linux": "electron-builder build -l -p never", "build:electron:win": "electron-builder build -w -p never", "dist": "./scripts/release-prepare.sh", "release": "release-it --non-interactive", diff --git a/scripts/release-prepare.sh b/scripts/release-prepare.sh index 39c546c..9a6e9e0 100755 --- a/scripts/release-prepare.sh +++ b/scripts/release-prepare.sh @@ -2,17 +2,28 @@ rm -rf {dist,build,src/renderer/.next,src/renderer/out}/ && \ npm run build:react && \ -npm run build:electron && \ +npm run build:electron:mac && \ if [ -x "$(command -v docker)" ]; then docker run --rm \ - --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 \ - /bin/bash -c "npm i && npm run build:react && npm run build:electron:win" + --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 \ + /bin/bash -c "npm i && npm run build:react && npm run build:electron:win" + + docker run --rm \ + --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:12 \ + /bin/bash -c "npm i && npm run build:react && npm run build:electron:linux" fi