lib/simple_deploy/cli/deploy.rb in simple_deploy-0.9.2 vs lib/simple_deploy/cli/deploy.rb in simple_deploy-0.10.0.beta.1
- old
+ new
@@ -47,17 +47,19 @@
opt :log_level, "Log level: debug, info, warn, error", :type => :string,
:default => 'info'
opt :name, "Stack name(s) of stack to deploy", :type => :string,
:multi => true
opt :quiet, "Quiet, do not send notifications"
+ opt :read_from_env, "Read credentials and region from environment variables"
opt :external, "Use external IP for ssh commands"
opt :internal, "Use internal IP for ssh commands"
end
valid_options? :provided => @opts,
- :required => [:environment, :name]
+ :required => [:environment, :name, :read_from_env]
- SimpleDeploy.create_config @opts[:environment]
+ config_arg = @opts[:read_from_env] ? :read_from_env : @opts[:environment]
+ SimpleDeploy.create_config config_arg
logger = SimpleDeploy.logger @opts[:log_level]
new_attributes = parse_attributes :attributes => @opts[:attributes]
@opts[:name].each do |name|