open-cluster-management-io / policy-generator-plugin

A Kustomize generator plugin to generate Open Cluster Management policies
Apache License 2.0
29 stars 31 forks source link

Fetch build version if version wasn't set a build time #122

Closed dhaiducek closed 1 year ago

dhaiducek commented 1 year ago

Using go install resulted in Unversioned binary, which didn't seem ideal. This allows us to set the version a build time (which is preferred for our ACM use cases) but also falls back to the Go determined module version when using go install, which is also a nice fallback. Here I tagged this branch and it retrieves the version as:

$ PolicyGenerator --version
v0.0.0-20230719194345-c518eac8081d

Followup to:

ref: https://issues.redhat.com/browse/ACM-5803

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek, JustinKuli

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/open-cluster-management-io/policy-generator-plugin/blob/main/OWNERS)~~ [JustinKuli,dhaiducek] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment