deploy
This file
Path
examples/deploy
38 lines · 764 bytes
Last changed by
optional descriptionsTj Holowaychukbefore adoption3636e5e
History of this fileTake it
Initial commitTj Holowaychukbefore adoption672c7d0
lines 1–151#!/usr/bin/env node23/**4 * Module dependencies.5 */67var program = require('../');89program10 .version('0.0.1')11 .option('-C, --chdir <path>', 'change the working directory')12 .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')13 .option('-T, --no-tests', 'ignore test hook')1415programoptional descriptionsTj Holowaychukbefore adoption3636e5e
lines 16–20why, one step back16 .command('setup [env]')17 .description('run setup commands for all envs')18 .action(function(env){19 env = env || 'all';20 console.log('setup for %s env(s)', env);Initial commitTj Holowaychukbefore adoption672c7d0
lines 21–2421 });2223program24 .command('exec <cmd>')optional descriptionsTj Holowaychukbefore adoption3636e5e
line 25why, one step back25 .description('execute the given remote cmd')Initial commitTj Holowaychukbefore adoption672c7d0
lines 26–3826 .action(function(cmd){27 console.log('exec "%s"', cmd);28 });2930program31 .command('*')32 .action(function(env){33 console.log('deploying "%s"', env);34 });3536program.parse(process.argv);3738