Skip to content

Commit

Permalink
Fixed jake build if leaflet copy is not a git repository
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwarz committed Jun 24, 2014
1 parent c1a4ba9 commit 04ed257
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function hint(msg, paths) {
console.log('\tCheck passed.\n');
complete();
});
}
};
}

desc('Check Leaflet source for errors with JSHint');
Expand All @@ -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');
Expand Down

0 comments on commit 04ed257

Please sign in to comment.