49c5b765 by Adam Heath

Fix handling of first-time builds, when dist/deploy-old does not exist.

1 parent 50cb71ab
...@@ -567,7 +567,7 @@ module.exports = function (grunt) { ...@@ -567,7 +567,7 @@ module.exports = function (grunt) {
567 fs.symlinkSync(target, 'dist/next-current'); 567 fs.symlinkSync(target, 'dist/next-current');
568 fs.renameSync('dist/next-current', 'dist/current'); 568 fs.renameSync('dist/next-current', 'dist/current');
569 if (current) { 569 if (current) {
570 if (fs.statSync('dist/deploy-old')) { 570 if (fs.existsSync('dist/deploy-old')) {
571 grunt.file.delete('dist/deploy-old'); 571 grunt.file.delete('dist/deploy-old');
572 } 572 }
573 fs.renameSync('dist/' + current, 'dist/deploy-old'); 573 fs.renameSync('dist/' + current, 'dist/deploy-old');
......