Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/design/build-mark/program.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ arguments and delegates to `Run`. Any `ArgumentException` or
`Context.WriteError`, and results in an exit code of 1. Any other exception is
re-thrown after logging so the runtime can report an unhandled exception.

### `Run(Context context) → int`
### `Run(Context context) → void`

Executes the main program logic against an already-constructed `Context`. The
method applies the following priority order:

1. If `context.Version` is set, print the version string and return 0.
2. If `context.Help` is set, print the usage message and return 0.
3. If `context.Validate` is set, delegate to `Validation.Run(context)` and return
the context exit code.
1. If `context.Version` is set, print the version string and return.
2. If `context.Help` is set, print the usage message and return.
3. If `context.Validate` is set, delegate to `Validation.Run(context)` and return.
4. Otherwise, call `ProcessBuildNotes(context)` to generate the build report.

The exit code is managed through `context.ExitCode` rather than as a return value.

### `ProcessBuildNotes(Context context)`

Resolves the build version, creates a repository connector via
Expand Down