lib/simple_deploy/cli/clone.rb in simple_deploy-0.9.2 vs lib/simple_deploy/cli/clone.rb in simple_deploy-0.10.0.beta.1
- old
+ new
@@ -19,24 +19,29 @@
EOS
opt :help, "Display Help"
opt :environment, "Set the target environment", :type => :string
opt :input_stack, "Read outputs from given stack(s) and map them \
to parameter inputs in the new stack. These will be passed to inputs with \
-matching or pluralized names. Can be specified multiple times.", :type => :string,
+matching or pluralized names. Can be specified multiple times.", :type => :string,
:multi => true
opt :log_level, "Log level: debug, info, warn, error", :type => :string,
:default => 'info'
opt :source_name, "Stack name for the stack to clone", :type => :string
opt :new_name, "Stack name for the new stack", :type => :string
opt :attributes, "= separated attribute and it's value", :type => :string,
:multi => true
opt :template, "Path to a new template file", :type => :string
+ opt :read_from_env, "Read credentials and region from environment variables"
end
valid_options? :provided => @opts,
- :required => [:environment, :source_name, :new_name]
+ :required => [:environment,
+ :source_name,
+ :new_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
SimpleDeploy.logger @opts[:log_level]
override_attributes = parse_attributes :attributes => @opts[:attributes]
cloned_attributes = filter_attributes source_stack.attributes