add helperversionoverride
This commit is contained in:
parent
c38e5cef34
commit
26053d5ab6
2
Makefile
2
Makefile
@ -68,7 +68,7 @@ GO_SRC += $(foreach dir,$(REC_DIRS),$(shell find $(dir) -name "*.go"))
|
||||
########## Required Tools ##########
|
||||
# Go Package required
|
||||
PKG_GOX := github.com/mitchellh/gox@v1.0.1
|
||||
PKG_GOLANGCI_LINT_VERSION := 1.25.0
|
||||
PKG_GOLANGCI_LINT_VERSION := 1.28.3
|
||||
PKG_GOLANGCI_LINT_SCRIPT := https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
|
||||
PKG_GOLANGCI_LINT := github.com/golangci/golangci-lint/cmd/golangci-lint@v${PKG_GOLANGCI_LINT_VERSION}
|
||||
|
||||
|
@ -31,6 +31,9 @@ import (
|
||||
// Version is the string that contains version
|
||||
var Version string
|
||||
|
||||
// HelperVersionOverride decouples the k3d helper image versions from the main version, if needed
|
||||
var HelperVersionOverride string
|
||||
|
||||
// K3sVersion should contain the latest version tag of k3s (hardcoded at build time)
|
||||
// we're setting a default version for edge cases, because the 'latest' tag is not actively maintained
|
||||
var K3sVersion = "v1.18.4+k3s1" // TODO: can we try to dynamically fetch the latest version at runtime and only fallback to this if it fails?
|
||||
@ -49,6 +52,9 @@ func GetHelperImageVersion() string {
|
||||
log.Infoln("Helper image tag set from env var")
|
||||
return tag
|
||||
}
|
||||
if len(HelperVersionOverride) > 0 {
|
||||
return HelperVersionOverride
|
||||
}
|
||||
if len(Version) == 0 {
|
||||
return "latest"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user