Fix releasing of electron app (#2816)
This commit is contained in:
parent
81b3b147bc
commit
e4813784d3
3
.github/workflows/push-master.yml
vendored
3
.github/workflows/push-master.yml
vendored
@ -47,9 +47,6 @@ jobs:
|
||||
# (No need to define this secret in the repo settings)
|
||||
github_token: ${{ secrets.github_token }}
|
||||
build_script_name: build:release:electron
|
||||
# If the commit is tagged with a version (e.g. "v1.0.0"),
|
||||
# release the app after building
|
||||
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
|
||||
dummy:
|
||||
name: Dummy
|
||||
|
||||
@ -46,10 +46,10 @@
|
||||
"build:release:www": "yarn polkadot-ci-ghact-build && yarn build:release:ipfs && yarn build:release:ghpages",
|
||||
"build:www": "rm -rf packages/apps/build && mkdir -p packages/apps/build && yarn run build:i18n && cd packages/apps && NODE_ENV=production webpack --config webpack.config.js",
|
||||
"build:electron": "yarn clean:electronBuild && yarn build:electronMain && yarn build:electronRenderer",
|
||||
"build:devElectronRenderer": "cd packages/apps-electron && webpack-dev-server --color --progress --config webpack.renderer.config.js",
|
||||
"build:electronRenderer": "cd packages/apps-electron && NODE_ENV=production webpack --config webpack.renderer.config.js",
|
||||
"build:devElectronMain": "cd packages/apps-electron && webpack --config webpack.main.config.js",
|
||||
"build:electronMain": "cd packages/apps-electron && NODE_ENV=production webpack --config webpack.main.config.js",
|
||||
"build:devElectronRenderer": "cd packages/apps-electron && NODE_ENV=development webpack-dev-server --color --progress --config webpack.renderer.config.js",
|
||||
"build:electronRenderer": "cd packages/apps-electron && webpack --config webpack.renderer.config.js",
|
||||
"build:devElectronMain": "cd packages/apps-electron && NODE_ENV=development webpack --config webpack.main.config.js",
|
||||
"build:electronMain": "cd packages/apps-electron && webpack --config webpack.main.config.js",
|
||||
"build:release:electron": "yarn build && yarn build:electron && yarn postinstall:electron",
|
||||
"packElectron:test": "yarn build:release:electron && electron-builder --dir",
|
||||
"packElectron:mac": "yarn build:release:electron && electron-builder build --mac",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const path = require('path');
|
||||
const ENV = process.env.NODE_ENV || 'development';
|
||||
const ENV = process.env.NODE_ENV || 'production';
|
||||
const isProd = ENV === 'production';
|
||||
|
||||
function createWebpack () {
|
||||
|
||||
@ -11,18 +11,20 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const findPackages = require('../../scripts/findPackages');
|
||||
|
||||
const ENV = process.env.NODE_ENV || 'development';
|
||||
const ENV = process.env.NODE_ENV || 'production';
|
||||
const isProd = ENV === 'production';
|
||||
const context = __dirname;
|
||||
|
||||
module.exports = merge(
|
||||
baseConfig({
|
||||
ENV,
|
||||
alias: findPackages().reduce((alias, { dir, name }) => {
|
||||
alias[name] = path.resolve(context, `../${dir}/src`);
|
||||
|
||||
return alias;
|
||||
}, {}),
|
||||
context
|
||||
context,
|
||||
isProd
|
||||
}),
|
||||
{
|
||||
devServer: {
|
||||
|
||||
@ -11,9 +11,7 @@ const webpack = require('webpack');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
const ENV = process.env.NODE_ENV || 'development';
|
||||
|
||||
function createWebpack ({ alias = {}, context, name = 'index' }) {
|
||||
function createWebpack ({ ENV, alias = {}, context, name = 'index' }) {
|
||||
const pkgJson = require(path.join(context, 'package.json'));
|
||||
const isProd = ENV === 'production';
|
||||
const hasPublic = fs.existsSync(path.join(context, 'public'));
|
||||
|
||||
@ -33,6 +33,7 @@ const plugins = isProd
|
||||
|
||||
module.exports = merge(
|
||||
baseConfig({
|
||||
ENV,
|
||||
alias: findPackages().reduce((alias, { dir, name }) => {
|
||||
alias[name] = path.resolve(context, `../${dir}/src`);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user