pstadler / flightplan

Run sequences of shell commands against local and remote hosts.
https://www.npmjs.com/package/flightplan
MIT License
1.82k stars 116 forks source link

Is it possible to pass command line arguments to flightplan.js? #112

Closed haimich closed 8 years ago

haimich commented 8 years ago

First of all let me say that you did an awesome job with flightplan! I used python's Fabric before and also tried Ansible on my project but neither of those solutions made it simple to execute local commands first.

What I'm trying to achieve is this: fly deploy:dev 0.1.2

Is it supported by flightplan to read in parameters from the command line?

pstadler commented 8 years ago

Glad to hear that.

This is indeed possible:

# plan.local(function(local) {
#   console.log(plan.runtime.options.argv.remain);
# });

$ fly task:target 0.1.2
# [ 'task:target', '0.1.2' ]

Flightplan uses nopt to parse arguments.