From 5071dcb333ecac305561af54aadfd083bb4afc79 Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Tue, 7 Mar 2017 10:06:30 -0800 Subject: [PATCH] fix: early exit to npm auto versioning --- src/scripts/npm/nodeVersion.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scripts/npm/nodeVersion.js b/src/scripts/npm/nodeVersion.js index 087bbb31..d35fbee1 100644 --- a/src/scripts/npm/nodeVersion.js +++ b/src/scripts/npm/nodeVersion.js @@ -15,7 +15,12 @@ for (var i = 0; i < files.length; i++) { var file = files[i] var content = readContent(file) + var updated = updateVersion(file, content, version) + // early exit (made no changes) + if (content === updated) return + + // save git += 'git add ' + file + ' && ' content = updateVersion(file, content, version) saveContent(file, content)