Permalink
Browse files
fix(publisher): dont call make twice while publishing
- Loading branch information
Showing
with
19 additions
and
9 deletions.
-
+3
−3
src/api/make.js
-
+5
−0
src/api/package.js
-
+5
−2
src/api/publish.js
-
+6
−4
src/electron-forge-make.js
|
@@ -105,9 +105,9 @@ export default async (providedOptions = {}) => { |
|
|
for (const target of targets) { |
|
|
// eslint-disable-next-line no-loop-func |
|
|
await asyncOra(`Making for target: ${target.cyan} - On platform: ${declaredPlatform.cyan} - For arch: ${targetArch.cyan}`, async () => { |
|
|
const maker = requireSearch(path.resolve(__dirname, '..'), [ |
|
|
`./makers/${process.platform}/${target}.js`, |
|
|
`./makers/generic/${target}.js`, |
|
|
const maker = requireSearch(__dirname, [ |
|
|
`../makers/${process.platform}/${target}.js`, |
|
|
`../makers/generic/${target}.js`, |
|
|
`electron-forge-maker-${target}`, |
|
|
]); |
|
|
if (!maker) { |
|
|
|
|
@@ -1,4 +1,5 @@ |
|
|
import 'colors'; |
|
|
import debug from 'debug'; |
|
|
import fs from 'fs-promise'; |
|
|
import glob from 'glob'; |
|
|
import path from 'path'; |
|
@@ -13,6 +14,8 @@ import readPackageJSON from '../util/read-package-json'; |
|
|
import rebuildHook from '../util/rebuild'; |
|
|
import resolveDir from '../util/resolve-dir'; |
|
|
|
|
|
const d = debug('electron-forge:packager'); |
|
|
|
|
|
/** |
|
|
* @typedef {Object} PackageOptions |
|
|
* @property {string} [dir=process.cwd()] The path to the app to package |
|
@@ -91,6 +94,8 @@ export default async (providedOptions = {}) => { |
|
|
throw new Error('electron-compile does not support asar.unpack yet. Please use asar.unpackDir'); |
|
|
} |
|
|
|
|
|
d('packaging with options', packageOpts); |
|
|
|
|
|
await pify(packager)(packageOpts); |
|
|
|
|
|
packagerSpinner.succeed(); |
|
|
|
@@ -34,7 +34,10 @@ export default async (providedOptions = {}) => { |
|
|
target: 'github', |
|
|
}, providedOptions); |
|
|
|
|
|
const makeResults = await make(makeOptions); |
|
|
const makeResults = await make(Object.assign({ |
|
|
dir, |
|
|
interactive, |
|
|
}, makeOptions)); |
|
|
|
|
|
dir = await resolveDir(dir); |
|
|
if (!dir) { |
|
@@ -54,7 +57,7 @@ export default async (providedOptions = {}) => { |
|
|
let publisher; |
|
|
await asyncOra(`Resolving publish target: ${`${target}`.cyan}`, async () => { |
|
|
publisher = requireSearch(__dirname, [ |
|
|
`./publishers/${target}.js`, |
|
|
`../publishers/${target}.js`, |
|
|
`electron-forge-publisher-${target}`, |
|
|
]); |
|
|
if (!publisher) { |
|
|
|
@@ -38,8 +38,10 @@ export const getMakeOptions = () => { |
|
|
return makeOpts; |
|
|
}; |
|
|
|
|
|
(async () => { |
|
|
const makeOpts = getMakeOptions(); |
|
|
if (process.mainModule === module) { |
|
|
(async () => { |
|
|
const makeOpts = getMakeOptions(); |
|
|
|
|
|
await make(makeOpts); |
|
|
})(); |
|
|
await make(makeOpts); |
|
|
})(); |
|
|
} |
0 comments on commit
55bfe1a