deploy
This file
Path
examples/deploy
46 lines · 1.2 KiB
Last changed by
Merge pull request #210 from tandrewnichols/add-aliasRandall Koutnikbefore adoption33db110
History of this fileTake it
The walk stopped after 200 commits: lines older than 80319b9 point at it.
typoTj Holowaychukbefore adoption80319b9
lines 1–17why, one step back1#!/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')1415program16 .command('setup [env]')17 .description('run setup commands for all envs')Merge branch 'integration'Tj Holowaychukbefore adoption731b4fc
lines 18–20why, one step back18 .option("-s, --setup_mode [mode]", "Which setup mode to use")19 .action(function(env, options){20 var mode = options.setup_mode || "normal";typoTj Holowaychukbefore adoption80319b9
line 21why, one step back21 env = env || 'all';Merge branch 'integration'Tj Holowaychukbefore adoption731b4fc
line 22why, one step back22 console.log('setup for %s env(s) with %s mode', env, mode);typoTj Holowaychukbefore adoption80319b9
lines 23–26why, one step back23 });2425program26 .command('exec <cmd>')Merge pull request #210 from tandrewnichols/add-aliasRandall Koutnikbefore adoption33db110
line 27why, one step back27 .alias('ex')typoTj Holowaychukbefore adoption80319b9
line 28why, one step back28 .description('execute the given remote cmd')Merge branch 'integration'Tj Holowaychukbefore adoption731b4fc
lines 29–37why, one step back29 .option("-e, --exec_mode <mode>", "Which exec mode to use")30 .action(function(cmd, options){31 console.log('exec "%s" using %s mode', cmd, options.exec_mode);32 }).on('--help', function() {33 console.log(' Examples:');34 console.log();35 console.log(' $ deploy exec sequential');36 console.log(' $ deploy exec async');37 console.log();typoTj Holowaychukbefore adoption80319b9
lines 38–46why, one step back38 });3940program41 .command('*')42 .action(function(env){43 console.log('deploying "%s"', env);44 });4546program.parse(process.argv);