Comparing version 0.6.3-29 to 0.6.4-31
@@ -18,2 +18,3 @@ exports.login = require('./lib/login.js'); | ||
exports.account = require('./lib/account.js'); | ||
exports.cloudfoundry = require('./lib/cloudfoundry.js'); | ||
@@ -23,2 +23,7 @@ | ||
}; | ||
// new way of setting live staging config | ||
case "config": { | ||
if (args.length != 4) return unknown("config", cb); | ||
else return config(args[0], args[1], args[2], args[3], cb); | ||
}; | ||
default: return unknown(action, cb); | ||
@@ -66,2 +71,36 @@ } | ||
// new way of setting target info.. | ||
function config(appId, cftarget, cfuser, cfpwd, cb) { | ||
log.verbose(appId, "cloudfoundry: appId"); | ||
log.verbose(cftarget, "cloudfoundry: cftarget"); | ||
log.verbose(cfuser, "cloudfoundry: cfuser"); | ||
log.verbose(cfpwd, "cloudfoundry: cfpwd"); | ||
// first validate CF target/login | ||
// var vmc = new vmcjs.VMC(cftarget, cfuser, cfpwd); | ||
// vmc.login(function(err, data) { | ||
// if(err) return cb(err); | ||
var config = { | ||
livetarget: 'cloudfoundry', | ||
cfurl: cftarget, | ||
cfuser: cfuser, | ||
cfpwd: cfpwd | ||
}; | ||
var params = { | ||
guid: appId, | ||
config: config | ||
}; | ||
// call the 'setstagingconfig' endpoint | ||
common.doApiCall(fhreq.getFeedHenryUrl(), "box/srv/1.1/ide/" + fhc.domain + "/app/setstagingconfig", params, "Error setting staging configuration: ", function(err, data) { | ||
if(err) return cb(err); | ||
log.silly(data, "setstagingconfig"); | ||
return cb(undefined, data); | ||
}); | ||
// }); | ||
}; | ||
// bash completion | ||
@@ -68,0 +107,0 @@ cloudfoundry.completion = function (opts, cb) { |
module.exports = stage; | ||
stage.usage = "\nfhc stage <appId> ", | ||
+ "\nfhc stage <appId> --live ", | ||
+ "\n Stage is made to Live environment if the '--live' flag is used"; | ||
stage.usage = "\nfhc stage <appId> " | ||
+ "\nfhc stage <appId> --live " | ||
+ "\nStage is made to Live environment if the '--live' flag is used"; | ||
@@ -8,0 +8,0 @@ var log = require("./utils/log"); |
@@ -5,3 +5,3 @@ { | ||
"keywords" : [ "cli", "feedhenry" ], | ||
"version": "0.6.3-29", | ||
"version": "0.6.4-31", | ||
"preferGlobal" : true, | ||
@@ -8,0 +8,0 @@ "homepage" : "http://git.io/fh-fhc", |
@@ -1,1 +0,1 @@ | ||
0.6.3-29 | ||
0.6.4-31 |
212687
5411