<commit_before>'use strict';

import gulp from 'gulp';
import del from 'del';
const builder = require('electron-builder');
import plumber from 'gulp-plumber';
import runSequence from 'run-sequence';

gulp.task('build-mac', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.MAC.createTarget(),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('build-linux', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.LINUX.createTarget(null, builder.Arch.ia32),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('build-win', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.WINDOWS.createTarget(null, builder.Arch.ia32),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('clean:package-win', () => del(['release/*win*.zip']));

gulp.task('clean:build-win-unpacked', () => del(['release/win-*']));

gulp.task('clean:package-linux', () => del(['release/*linux*.zip']));

gulp.task('clean:build-linux-unpacked', () => del(['release/linux-*']));

gulp.task('clean:package-mac', () => del(['release/*mac.zip']));

gulp.task('copy:zip:mac', () => {
    return gulp.src(['release/mac/*mac.zip'])
        .pipe(gulp.dest('release'))
});

gulp.task('clean:build-mac-unpacked', () => del(['release/mac']));

gulp.task('package-win', done => {
    runSequence(
        'clean:package-win',
        'build-win',
        'clean:build-win-unpacked',
        done
    );
});

gulp.task('package-linux', done => {
    runSequence(
        'clean:package-linux',
        'build-linux',
        'clean:build-linux-unpacked',<commit_msg>Fix for gulp package tasks<commit_after>'use strict';

import gulp from 'gulp';
import del from 'del';
const builder = require('electron-builder');
import plumber from 'gulp-plumber';
import runSequence from 'run-sequence';

gulp.task('build-mac', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.MAC.createTarget(),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('build-linux', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.LINUX.createTarget(null, builder.Arch.ia32),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('build-win', ['build:prod'], (done) => {

    builder.build({
            targets: builder.Platform.WINDOWS.createTarget(null, builder.Arch.ia32),
            devMetadata: {
                directories: {
                    app: 'dist'
                }
            }
        })
        .then(() => {
            done();
        })
        .catch(error => {
            done(error);
        });
});

gulp.task('clean:package-win', () => del(['release/*win.zip']));

gulp.task('clean:build-win-unpacked', () => del(['release/win-ia32-unpacked']));

gulp.task('clean:package-linux', () => del(['release/*linux.zip']));

gulp.task('clean:build-linux-unpacked', () => del(['release/linux-ia32-unpacked']));

gulp.task('clean:package-mac', () => del(['release/*mac.zip']));

gulp.task('copy:zip:mac', () => {
    return gulp.src(['release/mac/*mac.zip'])
        .pipe(gulp.dest('release'))
});

gulp.task('clean:build-mac-unpacked', () => del(['release/mac']));

gulp.task('package-win', done => {
    runSequence(
        'clean:package-win',
        'build-win',
        'clean:build-win-unpacked',
        done
    );
});

gulp.task('package-linux', done => {
    runSequence(
        'clean:package-linux',
        'build-linux',
        'clean:build-linux-unpacked',
{'fraction_non_alphanumeric': 0.1964481473361105, 'fraction_numerical': 0.00263100197325148, 'mean_word_length': 1.8459139114160947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6048424', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1375, 'n_words': 191}