Skip to content

Commit

Permalink
Merge branch 'stage'
Browse files Browse the repository at this point in the history
  • Loading branch information
brookshi committed Jun 15, 2018
2 parents 7e5cb07 + 9ab1e46 commit 4163865
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 4163865

Please sign in to comment.