cockroach-go icon indicating copy to clipboard operation
cockroach-go copied to clipboard

Add CLI tool for downloading CockroachDB binaries with cross-platform support

Open rail opened this issue 8 months ago • 1 comments

  • Create cmd/download-crdb-binaries CLI tool with flags:

    • -platform (linux, darwin, windows) - defaults to runtime.GOOS
    • -arch (amd64, arm64) - defaults to runtime.GOARCH
    • -version (specific version or 'unstable') - defaults to 'unstable'
    • -output (custom directory) - defaults to temp directory
  • Extend testserver package with platform-specific functions:

  • Fix unstable binary filename generation:

    • Changed from 'cockroach-' to descriptive 'cockroach-latest'
  • Add macOS ARM64 unsigned binary support:

    • Correct naming pattern: 'darwin-arm64.unsigned' for unstable builds
    • Enables downloading bleeding-edge builds on Apple Silicon
  • Maintain backward compatibility:

    • Original functions delegate to new platform-specific versions
    • Existing test server functionality unchanged
  • Remove unsupported musl detection.

The CLI tool now supports downloading any CockroachDB version for any supported platform/architecture combination, with 'unstable' as the sensible default for getting the latest bleeding-edge builds.

rail avatar Jun 23 '25 17:06 rail

This change is Reviewable

cockroach-teamcity avatar Jun 23 '25 17:06 cockroach-teamcity