diff --git a/package.json b/package.json index 2cfe4e6..b30e013 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "test:watch": "npm run jest -- --watch", "jest": "NODE_ENV=test jest -c tests/jest.config.js", "lint": "eslint --ignore-path .gitignore ./src/**/*.{js,jsx} && stylelint --ignore-path .gitignore ./src/**/*.{css,scss}", - "copy": "rsync src/renderer/images/icon* build/", - "build:react": "next build src/renderer && next export src/renderer && npm run copy", + "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:win": "electron-builder build -w -p never", "dist": "./scripts/release-prepare.sh", @@ -49,6 +49,8 @@ "auto-changelog": "^1.16.2", "babel-eslint": "^10.0.3", "babel-jest": "^25.1.0", + "copy": "^0.3.2", + "cross-env": "^7.0.0", "electron": "^8.0.0", "electron-builder": "^22.3.2", "electron-devtools-installer": "^2.2.4", @@ -70,7 +72,6 @@ }, "browserslist": "electron >= 8.0", "build": { - "asar": true, "appId": "com.kremalicious.blowfish", "files": [ "./src/main/**/*", diff --git a/scripts/release-prepare.sh b/scripts/release-prepare.sh index dcf80d5..39c546c 100755 --- a/scripts/release-prepare.sh +++ b/scripts/release-prepare.sh @@ -1,6 +1,6 @@ #!/bin/bash -rm -rf {dist,src/renderer/.next,src/renderer/out}/ && \ +rm -rf {dist,build,src/renderer/.next,src/renderer/out}/ && \ npm run build:react && \ npm run build:electron && \ @@ -14,6 +14,5 @@ if [ -x "$(command -v docker)" ]; then -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 && npm run build:electron:win" + /bin/bash -c "npm i && npm run build:react && npm run build:electron:win" fi -