Only init amazon SDK when we are publishing

This commit is contained in:
kpdecker
2013-10-04 10:33:40 -05:00
parent 0fe78f379a
commit 5fd0d4a790
+1 -1
View File
@@ -6,7 +6,6 @@ var _ = require('underscore'),
module.exports = function(grunt) {
grunt.registerTask('publish:latest', function() {
var done = this.async();
initSDK();
git.debug(function(remotes, branches) {
grunt.log.writeln('remotes: ' + remotes);
@@ -14,6 +13,7 @@ module.exports = function(grunt) {
git.commitInfo(function(err, info) {
if (info.isMaster) {
initSDK();
publish(fileMap(['-latest', '-' + info.head]), done);
} else {
// Silently ignore for branches