deploy
This file
Path
examples/deploy
37 lines · 1.2 KiB
Last changed by
Replace use of var with const and let (#1161)John Geebefore adoption3e5b05e
History of this fileTake it
The walk stopped after 200 commits: lines older than 77ffd4f point at it.
Merge pull request #814 from DanielRuf/chore/cache-node-modulesTomoaki Abebefore adoption77ffd4f
lines 1–2why, one step back1#!/usr/bin/env node2Merge branch 'develop' into release/5.xJohn Geebefore adoption491b2e4
lines 3–4why, one step back3// const program = require('commander'); // (normal include)4const program = require('../'); // include commander in git clone of commander repoMerge pull request #814 from DanielRuf/chore/cache-node-modulesTomoaki Abebefore adoption77ffd4f
lines 5–9why, one step back56program7 .version('0.0.1')8 .option('-C, --chdir <path>', 'change the working directory')9 .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')Examples: use "require" that works from git repo, and lint. (#1072)John Geebefore adoption57e9d98
line 10why, one step back10 .option('-T, --no-tests', 'ignore test hook');Merge pull request #814 from DanielRuf/chore/cache-node-modulesTomoaki Abebefore adoption77ffd4f
lines 11–14why, one step back1112program13 .command('setup [env]')14 .description('run setup commands for all envs')Examples: use "require" that works from git repo, and lint. (#1072)John Geebefore adoption57e9d98
lines 15–16why, one step back15 .option('-s, --setup_mode [mode]', 'Which setup mode to use')16 .action(function(env, options) {Replace use of var with const and let (#1161)John Geebefore adoption3e5b05e
line 17why, one step back17 const mode = options.setup_mode || 'normal';Merge pull request #814 from DanielRuf/chore/cache-node-modulesTomoaki Abebefore adoption77ffd4f
lines 18–25why, one step back18 env = env || 'all';19 console.log('setup for %s env(s) with %s mode', env, mode);20 });2122program23 .command('exec <cmd>')24 .alias('ex')25 .description('execute the given remote cmd')Examples: use "require" that works from git repo, and lint. (#1072)John Geebefore adoption57e9d98
lines 26–27why, one step back26 .option('-e, --exec_mode <mode>', 'Which exec mode to use')27 .action(function(cmd, options) {Merge pull request #814 from DanielRuf/chore/cache-node-modulesTomoaki Abebefore adoption77ffd4f
lines 28–37why, one step back28 console.log('exec "%s" using %s mode', cmd, options.exec_mode);29 }).on('--help', function() {30 console.log(' Examples:');31 console.log();32 console.log(' $ deploy exec sequential');33 console.log(' $ deploy exec async');34 console.log();35 });3637program.parse(process.argv);