Skip to content

Set the reported plugin version at release build time #35

Open

Description

@aufi

The v0.11.0 release assets are named and indexed as v0.11.0, but crane transform list-plugins reports v0.1.0 because openshift.PluginVersion is a hard-coded constant. This makes the installed binary disagree with the version selected from the plugin index.

Adopt the pattern used by crane-plugin-buildconfig-to-builds:

  • Change PluginVersion to an exported package variable initialized to "devel".
  • Build release binaries with -ldflags "-X github.com/migtools/crane-plugin-openshift/openshift.PluginVersion=${VERSION}".
  • Add a release-build check that each generated binary contains ${VERSION}, so a stale -X package path fails the release.
  • Do not register a version in crane-plugins until the corresponding artifacts have passed that check.

The release workflow should also avoid reusing release tags, so an indexed version always refers to immutable artifacts.

This issue covers the release workflow and a corrected release after the implementation is merged.

Activity

  1. added
    needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.
    on Oct 5, 2026
  2. github-actions commented on Oct 5, 2026

    @github-actions

    This issue is currently awaiting triage.
    If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
    The triage/accepted label can be added by org members by writing /triage accepted in a comment.

  3. self-assigned this
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions