Disable electron-builder publish for Windows installer
Template tests / tests (push) Successful in 1m42s
Template tests / tests (push) Successful in 1m42s
This commit is contained in:
@@ -46,7 +46,6 @@ function createWindowsInstallerConfig(outputDir) {
|
||||
win: {
|
||||
target: ['nsis'],
|
||||
},
|
||||
publish: 'never',
|
||||
nsis: {
|
||||
oneClick: false,
|
||||
allowToChangeInstallationDirectory: true,
|
||||
@@ -57,6 +56,14 @@ function createWindowsInstallerConfig(outputDir) {
|
||||
};
|
||||
}
|
||||
|
||||
function createWindowsInstallerBuildOptions(outputDir) {
|
||||
return {
|
||||
targets: Platform.WINDOWS.createTarget('nsis'),
|
||||
config: createWindowsInstallerConfig(outputDir),
|
||||
publish: 'never',
|
||||
};
|
||||
}
|
||||
|
||||
async function buildWindowsInstaller() {
|
||||
const releaseDir = path.resolve(process.env.STEPFORGE_RELEASE_DIR || path.join(ROOT_DIR, 'releases'));
|
||||
const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'stepforge-win-'));
|
||||
@@ -65,13 +72,8 @@ async function buildWindowsInstaller() {
|
||||
fs.mkdirSync(releaseDir, { recursive: true });
|
||||
fs.rmSync(outputDir, { recursive: true, force: true });
|
||||
|
||||
const config = createWindowsInstallerConfig(outputDir);
|
||||
|
||||
try {
|
||||
await build({
|
||||
targets: Platform.WINDOWS.createTarget('nsis'),
|
||||
config,
|
||||
});
|
||||
await build(createWindowsInstallerBuildOptions(outputDir));
|
||||
} catch (err) {
|
||||
throw new Error(`Windows installer build failed: ${err.message}`);
|
||||
}
|
||||
@@ -97,6 +99,7 @@ if (require.main === module) {
|
||||
module.exports = {
|
||||
APP_ID,
|
||||
createWindowsInstallerConfig,
|
||||
createWindowsInstallerBuildOptions,
|
||||
findInstallerExe,
|
||||
buildWindowsInstaller,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user