Skip to content

feat: add --dry-run flag for deploy and ship commands#82

Open
JoshSalway wants to merge 1 commit intolaravel:mainfrom
JoshSalway:fix/dead-code-and-dry-run
Open

feat: add --dry-run flag for deploy and ship commands#82
JoshSalway wants to merge 1 commit intolaravel:mainfrom
JoshSalway:fix/dead-code-and-dry-run

Conversation

@JoshSalway
Copy link

Summary

  • Dead code in BaseCommand::runUpdate() with TODO comment #38 — Dead code in BaseCommand::runUpdate(): Removed the misleading // TODO: When would we ever get here? comment. Analysis shows the code IS reachable: when in interactive mode with pre-filled form values (CLI options passed alongside interactive use) and the user confirms the update, execution reaches that branch. The code is correct; only the comment was wrong.
  • Feature: --dry-run flag for deploy and ship commands #39--dry-run flag for deploy and ship: Added {--dry-run : Show what would happen without executing} to both commands. When used, the commands resolve all options (application, environment, region, database type) and display the plan without making any mutating API calls.

Closes #38, closes #39.

Test plan

  • Added test: deploy --dry-run resolves app/env and succeeds without InitiateDeploymentRequest mock
  • Added test: ship --dry-run with explicit options shows plan without creating anything
  • Added test: ship --dry-run with defaults resolves correctly
  • All 387 existing tests continue to pass
  • PHPStan reports no errors

🤖 Generated with Claude Code

laravel#38: The code path in BaseCommand::runUpdate() is reachable when CLI
flags are passed in interactive mode and the user confirms. Removed
the misleading "When would we ever get here?" comment.

laravel#39: Added --dry-run flag to both deploy and ship commands. Shows what
would happen (app, environment, branch, region, database type) without
executing any API calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JoshSalway

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: --dry-run flag for deploy and ship commands Dead code in BaseCommand::runUpdate() with TODO comment

1 participant