'use strict';

const gulp = require('gulp');
const { build } = require('electron-builder');
const config = require('../electron-builder.json');
const { getEnvName } = require('./utils');

const publish = getEnvName() !== 'production' ? 'never' : 'onTagOrDraft';
gulp.task('release:darwin', () => build({ publish, x64: true, mac: [] }));
gulp.task('release:win32', () => build({ publish, x64: true, win: [ 'nsis', 'appx' ] }));
gulp.task('release:linux', (cb) => {
    build({ publish, x64: true, linux: [] })
        .then(() => build({ publish, ia32: true, linux: config.linux.target.filter(target => target !== 'snap') }))
        .then(() => cb(), (error) => cb(error));
});

gulp.task('release', [ 'build-app', `release:${ process.platform }` ]);

'use strict';

const gulp = require('gulp');
const { build } = require('electron-builder');
const config = require('../electron-builder.json');
const { getEnvName } = require('./utils');

const publish = getEnvName() !== 'production' ? 'never' : 'onTagOrDraft';
gulp.task('release:darwin', () => build({ publish, x64: true, mac: [] }));
gulp.task('release:win32', () => build({ publish, ia32: true, x64: true, win: [ 'nsis', 'appx' ] }));
gulp.task('release:linux', (cb) => {
    build({ publish, x64: true, linux: [] })
        .then(() => build({ publish, ia32: true, linux: config.linux.target.filter(target => target !== 'snap') }))
        .then(() => cb(), (error) => cb(error));
});

gulp.task('release', [ 'build-app', `release:${ process.platform }` ]);

Revert "Remove Windows build for ia32 arch"
Revert "Remove Windows build for ia32 arch"

This reverts commit ec504d074f02783b8e90ec149437e08f7d647bed.
