From 9dd53e86b2f63f12364f432eacd2ea43bb0d1f03 Mon Sep 17 00:00:00 2001 From: Dave Herman Date: Fri, 8 Jun 2012 23:26:06 -0700 Subject: [PATCH] don't commit or push if there are no changes --- lib/build.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/build.js b/lib/build.js index f313ccf..fe032b1 100644 --- a/lib/build.js +++ b/lib/build.js @@ -111,6 +111,12 @@ function push(message, cb) { } console.log("added files: " + add); console.log("removed files: " + rm); + + if (add.length === 0 && rm.length === 0) { + console.log("no changes"); + return cb(); + } + async.series([ // git rm -rf function(cb) {