openshift / ocm-container

Containerized environment for accessing OpenShift v4 clusters, packing necessary tools/scripts
Apache License 2.0
10 stars 63 forks source link

Add version subcommand #287

Closed samanthajayasinghe closed 1 month ago

samanthajayasinghe commented 1 month ago

What

Display the current ocm-container version and latest version

{
  "commit": "65ef57625bf38a6dbc4d4e18e03fa3ee5298abac",
  "version": "0.1.0",
  "latest": "0.2.0"
}
rendhalver commented 1 month ago

If I build this from the branch I see this but I guess that's expected given it's not built off a tag.

$ ./build/ocm-container version
Using config file: /home/pebrown/.config/ocm-container/ocm-container.yaml
{
  "commit": "65ef57625bf38a6dbc4d4e18e03fa3ee5298abac",
  "version": "",
  "latest": "0.2.0"
}
samanthajayasinghe commented 1 month ago

If I build this from the branch I see this but I guess that's expected given it's not built off a tag.

$ ./build/ocm-container version
Using config file: /home/pebrown/.config/ocm-container/ocm-container.yaml
{
  "commit": "65ef57625bf38a6dbc4d4e18e03fa3ee5298abac",
  "version": "",
  "latest": "0.2.0"
}

Yeah.. gorelaser only updates the pkg/utils.Version for tags

rendhalver commented 1 month ago

Cool. Let's get this in. Thanks Sam! /lgtm /approved

Making a new release after this seems prudent too. :)

rendhalver commented 1 month ago

Hrm. labels aren't getting added.

/lgtm

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rendhalver, samanthajayasinghe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/ocm-container/blob/master/OWNERS)~~ [rendhalver] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment