lib/opsworks/cli/subcommands/deployments.rb in opsworks-cli-0.5.0 vs lib/opsworks/cli/subcommands/deployments.rb in opsworks-cli-0.6.0

- old
+ new

@@ -14,10 +14,15 @@ say "Loading last deployment for #{stack.name}" [stack, stack.deployments.max_by(&:created_at)] end will_retry = last_deployment.map do |stack, deployment| + if deployment.nil? + say "Skipping stack #{stack.name}: no deployment" + next + end + if deployment.status == 'successful' say "Skipping stack #{stack.name}: last deployment is " \ "#{deployment.status}" next end @@ -51,10 +56,10 @@ instance_ids: instance_ids } opts[:app_id] = dep.app_id if dep.app_id opts[:custom_json] = dep.custom_json if dep.custom_json - new_deployment = stack.send(:create_deployment, opts) + new_deployment = stack.create_deployment(opts) [stack, new_deployment] end say "Waiting #{options[:timeout]}s for deployments to finish"