You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not CI or reproducible environment friendly. Ideally, you would define your dependency version on some file, then just have it available in your environment.
Using the module approach and updating your go.mod does not make the binary available after go mod tidy, so the CI will not be able to use controller-gen.
There is no ready available packaging such as with brew or Debian.
Given than using the CLI generator tool as a module is not natively supported by Go, and that a binary distribution of some kind is required, we would like to propose the following change.
Use the industry standard way to set a version with ldflags, for instance -X sigs.k8s.io/controller-tools/pkg/version.Version=X.Y.Z
When Version is not an empty string, override the usual return info.Main.Version with such local Version value.
Change the builds to set the version at compile time, so official releases will render their correct version.
We are ready to follow up with a patch for this.
The text was updated successfully, but these errors were encountered:
The version computing code assumes the usage of the
controller-gen
will always be as a module:Moreover, downloading the official released binaries from this repo directly they still render
(devel)
as the binary version.This is not CI or reproducible environment friendly. Ideally, you would define your dependency version on some file, then just have it available in your environment.
Using the module approach and updating your
go.mod
does not make the binary available aftergo mod tidy
, so the CI will not be able to usecontroller-gen
.There is no ready available packaging such as with brew or Debian.
Reproducible builds with versioning exist from nix, by patching the versioning code in this repository.
Given than using the CLI generator tool as a module is not natively supported by Go, and that a binary distribution of some kind is required, we would like to propose the following change.
ldflags
, for instance-X sigs.k8s.io/controller-tools/pkg/version.Version=X.Y.Z
info.Main.Version
with such localVersion
value.We are ready to follow up with a patch for this.
The text was updated successfully, but these errors were encountered: