Skip to content

Commit

Permalink
Simplying logic that for some reason was causing failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dorgan committed Apr 30, 2016
1 parent 5a6dc5d commit 7c52eef
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tasks/grunt-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function(grunt){

options.additionalFiles.push(file);

if (typeof options.github !== 'undefined' && !options.github.apiRoot) {
if (options.github && !options.github.apiRoot) {
options.github.apiRoot = 'https://api.github.com'; // Default Github.com api
}

Expand Down Expand Up @@ -134,15 +134,15 @@ module.exports = function(grunt){
if (nowrite) {
grunt.log.ok(msg || cmd);
deferred.resolve();
}
else {
var success = shell.exec(cmd, {silent:true}).code === 0;
} else {
var success = shell.exec(cmd, {
silent: true
}).code === 0;

if (success) {
grunt.log.ok(msg || cmd);
deferred.resolve();
}
else{
} else {
// fail and stop execution of further tasks
deferred.reject('Failed when executing: `' + cmd + '`\n');
}
Expand Down Expand Up @@ -207,7 +207,9 @@ module.exports = function(grunt){
msg += ' with a tag of "' + npmtag + '"';
}

if (options.folder){ cmd += ' ' + options.folder; }
if (options.folder) {
cmd += ' ' + options.folder;
}
return run(cmd, msg);
}

Expand Down

0 comments on commit 7c52eef

Please sign in to comment.