lib/percheron/cli/recreate_command.rb in percheron-0.5.0 vs lib/percheron/cli/recreate_command.rb in percheron-0.6.0
- old
+ new
@@ -1,14 +1,21 @@
module Percheron
module CLI
class RecreateCommand < AbstractCommand
- parameter 'STACK_NAME', 'stack name'
+ default_parameters!
option "--force", :flag, 'Force recreation', default: false
+ option "--delete", :flag, 'Delete container + image before recreation', default: false
def execute
- Percheron::Stack.new(config, stack_name).recreate!(force_recreate: force?, force_auto_recreate: true)
+ opts = {
+ container_names: container_names,
+ force_recreate: force?,
+ delete: delete?
+ }
+
+ Percheron::Stack.new(config, stack_name).recreate!(opts)
end
end
end
end