Skip to content

Add dev-cli check-version using ganda repo check-version #2

Description

@StevenTCramer

Background

ganda repo check-version has been implemented as a shared cross-repo version-check command. This repo's dev-cli does not yet have a check-version command; the release pipeline references it but it is missing.

Required changes for this repo

  1. Add tools/dev-cli/endpoints/check-version-command.cs delegating to ganda:
[NuruRoute("check-version", Description = "Verify version is ready to release")]
internal sealed class CheckVersionCommand : ICommand<Unit>
{
  internal sealed class Handler : ICommandHandler<CheckVersionCommand, Unit>
  {
    public async ValueTask<Unit> Handle(CheckVersionCommand command, CancellationToken ct)
    {
      int exitCode = await Shell.Builder("ganda")
        .WithArguments("repo", "check-version", "--strategy", "nuget-search",
          "--package", "<PackageId>")
        .RunAsync(ct);

      if (exitCode != 0) Environment.Exit(exitCode);
      return Unit.Value;
    }
  }
}

Replace <PackageId> with the actual NuGet package ID(s) for this repo.

Why

  • Standardizes check-version across all TimeWarp repos
  • Single shared implementation in ganda

Reference

  • ganda implementation: source/timewarp-ganda/endpoints/repo/repo-check-version-command.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions