Skip to content

Commit

Permalink
update gulp file
Browse files Browse the repository at this point in the history
  • Loading branch information
brookshi committed Jun 8, 2018
1 parent c70e4f9 commit 9ab1e46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var gulp = require('gulp'),
path = require('path'),
archiver = require('archiver');

gulp.task('build', ['copyTemplate', 'copyGlobalData', 'copyLocales']);
gulp.task('build', ['copyTemplate', 'copyGlobalData', 'copyLocales', 'createBackupFolder']);

gulp.task('package', ['release'], function () {
const keepFiles = ['build', 'node_modules', 'appconfig.json', 'gulpfile.js', 'logconfig.json', 'mail.json', 'pm2.json', 'sample collection.json', 'tsconfig.json'];
Expand Down Expand Up @@ -72,7 +72,9 @@ gulp.task('copyLocales', function () {

gulp.task('createBackupFolder', function () {
const backupFolder = path.join(__dirname, 'build/backup');
fs.rmdirSync(backupFolder);
if (fs.existsSync(backupFolder)) {
fs.removeSync(backupFolder);
}
fs.mkdirSync(backupFolder, 0o666);
});

Expand Down

0 comments on commit 9ab1e46

Please sign in to comment.