Use git describe for finding operator version
We need to be able to set the replaces attribute of the CSV file so
that OLM can build a relationship between dependencies, which is
important for disconnected installations and upgrades.
Previously, we were using the version in the CSV file, which worked but
it would change within the make prepare-release target depending on
when the command was invoked.
This commit updates the version script to use git describe instead,
which makes finding the current version more robust since tagging isn't
done until a subsequent step of the release process.
/hold for test
Verification passed with 4.16.0-0.nightly-2024-04-01-213440 + compliance-operator from pr #500 code
$ oc get csv
NAME DISPLAY VERSION REPLACES PHASE
compliance-operator.v1.4.0 Compliance Operator 1.4.0 Succeeded
$ git describe --tags --abbrev=0 | tr -d v
1.4.0
/unhold
/label qe-aprroved
@BhargaviGudi: The label(s) /label qe-aprroved cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?
In response to this:
/label qe-aprroved
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: rhmdnd, yuumasato
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [rhmdnd]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest-required