Skip to content

Commit

Permalink
fix(app): Fix release task
Browse files Browse the repository at this point in the history
  • Loading branch information
thaiat committed Jan 26, 2015
1 parent 921d9b7 commit 1464705
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions gulp_tasks/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ gulp.task('release', 'Publish a new release version.', ['push']);
var github = new GitHubApi({
version: '3.0.0',
protocol: 'https',
timeout: 5000
timeout: 0
});

var gitGetEmailAsync = Q.nbind(git.exec, git, {
Expand Down Expand Up @@ -164,16 +164,20 @@ var githubAuthSetupAndTestAsync = function(result) {
});
github.misc.rateLimit({}, function(err, res) {
if(err) {
deferred.reject(gutil.colors.red('GitHub auth failed! ') + 'Response from server: ' + gutil.colors.yellow(JSON.parse(err).message));
}
deferred.resolve(gutil.colors.green('GitHub auth successful!'));
deferred.reject(gutil.colors.red('Github api failed! ') + ' Response from server: ' + gutil.colors.yellow(err.message));
deferred.reject(err.message);
}
deferred.resolve(gutil.colors.green('Github authentication successful!'));
});
return deferred.promise;
};

gulp.task('githubAuth', false, function(cb) {
return gitGetEmailAsync()
.then(githubUsernameAsync)
.fail(function() {
return null;
})
.then(function(username) {
return {
username: username,
Expand Down

0 comments on commit 1464705

Please sign in to comment.