From 04ed2571fb0a18a7af57037bcdfeb8dd2dd1f5f8 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Tue, 24 Jun 2014 22:58:54 +0200 Subject: [PATCH] Fixed jake build if leaflet copy is not a git repository --- Jakefile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index bb965e41..1e3599c9 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -23,7 +23,7 @@ function hint(msg, paths) { console.log('\tCheck passed.\n'); complete(); }); - } + }; } desc('Check Leaflet source for errors with JSHint'); @@ -36,12 +36,14 @@ desc('Combine and compress Leaflet source files'); task('build', {async: true}, function (compsBase32, buildName) { var v; - jake.exec('git log -1 --pretty=format:"%h"', {}, function () { + jake.exec('git log -1 --pretty=format:"%h"', {breakOnError: false}, function () { build.build(complete, v, compsBase32, buildName); }).on('stdout', function (data) { v = version + ' (' + data.toString() + ')'; - }) + }).on('error', function () { + v = version; + }); }); desc('Run PhantomJS tests');