1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

zip safari

This commit is contained in:
Kyle Spearrin 2018-01-16 10:16:12 -05:00
parent 775ba87a11
commit d654253165

View File

@ -141,13 +141,15 @@ function edgeCopyAssets(source, dest) {
}
gulp.task('dist:safari', (cb) => {
const buildPath = paths.dist + 'bitwarden.safariextension/';
const safariAssetsBuildPath = buildPath + 'safari/';
const buildPath = paths.dist + 'Safari/';
const extBuildPath = buildPath + 'bitwarden.safariextension/';
const extAssetsBuildPath = extBuildPath + 'safari/';
return del([buildPath + '**/*'])
.then(() => safariCopyBuild(paths.build + '**/*', buildPath))
.then(() => copy(safariAssetsBuildPath + '**/*', buildPath))
.then(() => del([safariAssetsBuildPath]))
.then(() => safariCopyBuild(paths.build + '**/*', extBuildPath))
.then(() => copy(extAssetsBuildPath + '**/*', extBuildPath))
.then(() => del([extAssetsBuildPath]))
.then(() => safariZip(buildPath))
.then(() => {
return cb;
}, () => {
@ -166,6 +168,16 @@ function safariCopyBuild(source, dest) {
});
}
function safariZip(buildPath) {
return new Promise((resolve, reject) => {
gulp.src(buildPath + '**/*')
.on('error', reject)
.pipe(zip(distFileName('safari', 'zip')))
.pipe(gulp.dest(paths.dist))
.on('end', resolve);
});
}
gulp.task('build', ['lint', 'webfonts']);
gulp.task('webfonts', () => {