Skip to content

rocm version reports 0.1.0 for every build, including main and tagged releases #807

Open

Description

@rominf

Current behavior

rocm version and rocm --version always lead with package version 0.1.0. The workspace version in Cargo.toml is hardcoded to 0.1.0 and is not bumped when a release is tagged.

The parenthetical ref and commit distinguish builds, but the version number does not. A build from main prints 0.1.0 (main, <hash>). A build of tag v0.2.1 prints 0.1.0 (v0.2.1, <hash>).

Expected behavior

The version a user reads should identify the build. A tagged release should report that release's version. A build from main should not be presented as 0.1.0.

Steps to reproduce

  1. Install a release build, or build main.
  2. Run rocm version.

Observed on a v0.2.1 binary:

rocm-cli 0.1.0 (v0.2.1, 1cde824)

Possible solution

Drive CARGO_PKG_VERSION from the release tag (the ref build.rs already resolves), and give main and other non-tag builds a version that is not a frozen 0.1.0.

Your environment

  • rocm-cli version (rocm --version): 0.1.0 (v0.2.1, 1cde824)
  • Platform: Linux

Relevant log output

rocm-cli 0.1.0 (v0.2.1, 1cde824)

Additional context

cli_version_string in apps/rocm/src/main.rs formats {CARGO_PKG_VERSION} ({ROCM_CLI_VERSION_REF}, {ROCM_CLI_GIT_HASH}). The ref and hash are already embedded at build time. Only the leading number stays at 0.1.0.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions