Skip to content

Commit

Permalink
refactor (github release) print success message when using --no-write…
Browse files Browse the repository at this point in the history
… option
  • Loading branch information
geddski committed Sep 30, 2013
1 parent 58edab8 commit de27f31
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tasks/grunt-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module.exports = function(grunt){

if (nowrite){
grunt.verbose.writeln('Not actually creating github release: ' + tagName);
done();
success();
}

request
Expand All @@ -126,13 +126,17 @@ module.exports = function(grunt){
.send({"tag_name": tagName, "name": tagMessage})
.end(function(res){
if (res.statusCode === 201){
grunt.log.ok('created ' + tagName + ' release on github.');
done();
success();
}
else {
grunt.fail.warn('Error creating github release. Response: ' + res.text);
}
});

function success(){
grunt.log.ok('created ' + tagName + ' release on github.');
done();
}
}

});
Expand Down

0 comments on commit de27f31

Please sign in to comment.