version: allow overriding helper image version from env var
This commit is contained in:
parent
920159aa11
commit
d2deb02c3d
@ -22,6 +22,8 @@ THE SOFTWARE.
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/heroku/docker-registry-client/registry"
|
"github.com/heroku/docker-registry-client/registry"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
@ -43,6 +45,10 @@ func GetVersion() string {
|
|||||||
|
|
||||||
// GetHelperImageVersion returns the CLI version or 'latest'
|
// GetHelperImageVersion returns the CLI version or 'latest'
|
||||||
func GetHelperImageVersion() string {
|
func GetHelperImageVersion() string {
|
||||||
|
if tag := os.Getenv("K3D_HELPER_IMAGE_TAG"); tag != "" {
|
||||||
|
log.Infoln("Helper image tag set from env var")
|
||||||
|
return tag
|
||||||
|
}
|
||||||
if len(Version) == 0 {
|
if len(Version) == 0 {
|
||||||
return "latest"
|
return "latest"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user