#
option
Sometimes Required
Defines a flag argument.
title 'Admin Tools'
usage 'deploy [--build --env ENV]'
option '--build, -b', 'Build before deploying'
option '--env, -e ENV', 'Specify environment to deploy to [default: stage]'
action 'deploy' do |args|
env = args['--env']
say 'Building...' if args['--build']
say "Deploying to #{env}"
end
$ run --help
Admin Tools
Usage:
run deploy [--build --env ENV]
run (--help | -h)
Options:
--build, -b
Build before deploying
--env, -e ENV
Specify environment to deploy to [default: stage]
--help, -h
Show this message
$ run deploy -b -e production
Building...
Deploying to production