Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove previous build dir
  • Loading branch information
felixge committed Nov 13, 2012
1 parent c63d1c8 commit d47fa28
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/deploySite.js
Expand Up @@ -26,6 +26,7 @@ Deployment.prototype.execute = function(cb) {
this._start = Date.now();

async.waterfall([
this._removePreviousBuildDir.bind(this),
this._createClone.bind(this),
this._checkoutGithubPagesBranch.bind(this),
this._cleanGithubPagesBranch.bind(this),
Expand All @@ -39,6 +40,13 @@ Deployment.prototype.execute = function(cb) {
], cb);
};

Deployment.prototype._removePreviousBuildDir = function(next) {
this._stdout.write('Deleting previous build dir ...\n');

var args = ['-rf', this._build];
this._execute('rm', {args: args}, next);
};

Deployment.prototype._createClone = function(next) {
this._stdout.write('Creating a local clone of your site ...\n');

Expand Down

0 comments on commit d47fa28

Please sign in to comment.