deploy
This file
Path
examples/deploy
35 lines · 1.1 KiB
Last changed by
Change to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
History of this fileTake it
The walk stopped after 200 commits: lines older than 04766dc point at it.
Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
lines 1–2why, one step back1#!/usr/bin/env node2Merge pull request #1305 from tj/release/6.xTomoaki Abebefore adoptionc5a5e7b
lines 3–5why, one step back3// const { Command } = require('commander'); // (normal include)4const { Command } = require('../'); // include commander in git clone of commander repo5const program = new Command();Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
lines 6–8why, one step back67program8 .version('0.0.1')Change to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
line 9why, one step back9 .option('-c, --config <path>', 'set config path', './deploy.conf');Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
lines 10–13why, one step back1011program12 .command('setup [env]')13 .description('run setup commands for all envs')Change to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
lines 14–15why, one step back14 .option('-s, --setup_mode <mode>', 'Which setup mode to use', 'normal')15 .action((env, options) => {Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
line 16why, one step back16 env = env || 'all';Change to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
lines 17–18why, one step back17 console.log('read config from %s', program.opts().config);18 console.log('setup for %s env(s) with %s mode', env, options.setup_mode);Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
lines 19–21why, one step back19 });2021programChange to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
line 22why, one step back22 .command('exec <script>')Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
lines 23–24why, one step back23 .alias('ex')24 .description('execute the given remote cmd')Change to safe storage of options by default, and change action parameters (#1409)John Geebefore adoptionf76bc71
lines 25–28why, one step back25 .option('-e, --exec_mode <mode>', 'Which exec mode to use', 'fast')26 .action((script, options) => {27 console.log('read config from %s', program.opts().config);28 console.log('exec "%s" using %s mode and config %s', script, options.exec_mode, program.opts().config);Expand help customisation with .addHelpText (#1296)John Geebefore adoptiond26a26d
lines 29–34why, one step back29 }).addHelpText('after', `30Examples:31 $ deploy exec sequential32 $ deploy exec async`33 );34 Merge pull request #1101 from shadowspawn/feature/update-dependenciesTomoaki Abebefore adoption04766dc
line 35why, one step back35program.parse(process.argv);