mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +01:00
zip safari
This commit is contained in:
parent
775ba87a11
commit
d654253165
22
gulpfile.js
22
gulpfile.js
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user