A tiny script for automating the deployment of a tarball to heroku.
npm install heroku-deploy-tarball
deploy.js
var deploy = require('heroku-deploy-tarball');
var config = {
app: 'my-heroku-app',
tarball: 'path/to/build.tar.gz'
}
deploy(config);
shell
node deploy
deploy.js
var deploy = require('heroku-deploy-tarball');
var requestedTarget = process.argv[2];
if (!requestedTarget) {
console.log('You must specify a deploy target');
return;
}
var targets = {
staging: {
app: 'my-heroku-staging-app',
tarball: 'build.tar.gz'
},
production: {
app: 'my-heroku-production-app',
tarball: 'build.tar.gz'
}
};
deploy(targets[requestedTarget]);
shell
node deploy staging