Skip to content

[mandrel-ops] upstream-finalize: Infer --version from suite.py when not explicitly provided #526

Description

@zakkak

As noted in #520 (comment), the --version flag in upstream-finalize could be inferred from the local repository's suite.py files instead of requiring the user to pass it explicitly.

By the time upstream-finalize runs, Step 1 (upstream-mark) has already set the version in suite.py and the PR has been merged, so the version is available locally after a git pull.

There is already a version-extraction pattern in SuiteOpsUtils.inferOpenMilestone() (using VERSION_PATTERN against compiler/mx.compiler/suite.py) that could be reused.

Proposed change:

  • Make --version optional in upstream-finalize
  • When omitted, read the version from compiler/mx.compiler/suite.py in --dir and print it (e.g., "Auto-inferred version from suite.py: 23.1.11")
  • Fail with a clear error if the version cannot be determined and --version was not provided

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions