Skip to content

Built binary will report wrong version when executing oc version #740

Closed
@MohsenRahimi

Description

@MohsenRahimi

I checked out the release tag openshift-clients-4.6.0-202006250705.p0
after build, 'oc version' is reporting 4.2.

I dig a little bit and found out in github.com/openshift/build-machinery-go/make/lib/golang.mk line 53

SOURCE_GIT_TAG ?=$(shell git describe --long --tags --abbrev=7 --match 'v[0-9]*' || echo 'v0.0.0-unknown')

--match 'v[0-9]*' causing this issue, as recent tags start with 'openshift-clients-' not 'v'

I built the binary on MacOs Big Sur

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions