Extract check and build command workflows
This commit is contained in:
@@ -45,6 +45,18 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) int {
|
|||||||
fmt.Fprintf(stdout, "releasekit %s\n", buildinfo.Version())
|
fmt.Fprintf(stdout, "releasekit %s\n", buildinfo.Version())
|
||||||
return 0
|
return 0
|
||||||
case cli.CheckAction, cli.PublishAction:
|
case cli.CheckAction, cli.PublishAction:
|
||||||
|
return runCheckOrPublish(ctx, invocation, stdout, stderr)
|
||||||
|
case cli.BuildAction:
|
||||||
|
return runBuild(ctx, invocation, stdout, stderr)
|
||||||
|
case cli.DeliveryAction:
|
||||||
|
return runDelivery(ctx, invocation, stdout, stderr)
|
||||||
|
case cli.CIDeliveryAction:
|
||||||
|
return runCIDelivery(ctx, invocation, stdout, stderr)
|
||||||
|
}
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
func runCheckOrPublish(ctx context.Context, invocation cli.Invocation, stdout, stderr io.Writer) int {
|
||||||
settings, err := cli.LoadSettings(invocation.Repository, invocation.ConfigPath)
|
settings, err := cli.LoadSettings(invocation.Repository, invocation.ConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(stderr, "load profile: %v\n", err)
|
fmt.Fprintf(stderr, "load profile: %v\n", err)
|
||||||
@@ -82,7 +94,9 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) int {
|
|||||||
}
|
}
|
||||||
fmt.Fprintf(stdout, "local candidate module %s version %s tag %s at %s is valid\n", candidate.ModulePath, candidate.Version, candidate.Tag, candidate.Commit)
|
fmt.Fprintf(stdout, "local candidate module %s version %s tag %s at %s is valid\n", candidate.ModulePath, candidate.Version, candidate.Tag, candidate.Commit)
|
||||||
return 0
|
return 0
|
||||||
case cli.BuildAction:
|
}
|
||||||
|
|
||||||
|
func runBuild(ctx context.Context, invocation cli.Invocation, stdout, stderr io.Writer) int {
|
||||||
settings, err := cli.LoadSettings(invocation.Repository, invocation.ConfigPath)
|
settings, err := cli.LoadSettings(invocation.Repository, invocation.ConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(stderr, "load profile: %v\n", err)
|
fmt.Fprintf(stderr, "load profile: %v\n", err)
|
||||||
@@ -141,12 +155,6 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) int {
|
|||||||
}
|
}
|
||||||
fmt.Fprintf(stdout, "build receipt: %s\n", receiptPath)
|
fmt.Fprintf(stdout, "build receipt: %s\n", receiptPath)
|
||||||
return 0
|
return 0
|
||||||
case cli.DeliveryAction:
|
|
||||||
return runDelivery(ctx, invocation, stdout, stderr)
|
|
||||||
case cli.CIDeliveryAction:
|
|
||||||
return runCIDelivery(ctx, invocation, stdout, stderr)
|
|
||||||
}
|
|
||||||
return 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func candidateRequest(invocation cli.Invocation, settings cli.Settings, output io.Writer) releasekit.ReleaseRequest {
|
func candidateRequest(invocation cli.Invocation, settings cli.Settings, output io.Writer) releasekit.ReleaseRequest {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ the agent policy; an intermediate compilation dependency is recorded accurately.
|
|||||||
| 13 | A09 | Complete — bounded reads, size and digest mismatches, stream failures, cancellation, reconciliation, and public prebuilt delivery checks passed. |
|
| 13 | A09 | Complete — bounded reads, size and digest mismatches, stream failures, cancellation, reconciliation, and public prebuilt delivery checks passed. |
|
||||||
| 14 | A10 | Complete — bounded and full capture, forwarding, error identity, concurrency, and benchmark modes passed. |
|
| 14 | A10 | Complete — bounded and full capture, forwarding, error identity, concurrency, and benchmark modes passed. |
|
||||||
| 15 | A13 | Complete — validation ordering, scope, tree lifecycle, diagnostics, and public callback checks passed. |
|
| 15 | A13 | Complete — validation ordering, scope, tree lifecycle, diagnostics, and public callback checks passed. |
|
||||||
| 16 | A15 | Pending |
|
| 16 | A15 | Complete — the full CLI command suite passed after workflow extraction. |
|
||||||
| 17 | Remaining A19, A20 | Pending |
|
| 17 | Remaining A19, A20 | Pending |
|
||||||
| 18 | A11, A17: assessment only | Pending |
|
| 18 | A11, A17: assessment only | Pending |
|
||||||
| 19 | Integrated verification and current documentation | Pending |
|
| 19 | Integrated verification and current documentation | Pending |
|
||||||
|
|||||||
Reference in New Issue
Block a user