grafana-backuper/internal/version/version.go

18 lines
328 B
Go
Raw Permalink Normal View History

package version
import (
"fmt"
)
var (
version = "undefined"
versionPrerelease = "dev" //nolint:gochecknoglobals // this has to be a variable to set the version during release.
)
func Version() string {
if versionPrerelease != "" {
return fmt.Sprintf("%s-%s", version, versionPrerelease)
}
return version
}