Merge pull request #21542 from jakecorrenti/bump-gvproxy

Enable passing logfile to gvproxy
This commit is contained in:
openshift-merge-bot[bot]
2024-02-12 21:49:41 +00:00
committed by GitHub
10 changed files with 37 additions and 56 deletions

View File

@@ -22,6 +22,9 @@ type GvproxyCommand struct {
// Map of different sockets provided by user (socket-type flag:socket)
sockets map[string]string
// Logfile where gvproxy should redirect logs
LogFile string
// File where gvproxy's pid is stored
PidFile string
@@ -179,6 +182,11 @@ func (c *GvproxyCommand) ToCmdline() []string {
args = append(args, "-pid-file", c.PidFile)
}
// log-file
if c.LogFile != "" {
args = append(args, "-log-file", c.LogFile)
}
return args
}

View File

@@ -45,6 +45,16 @@ func moduleVersion() string {
return gitArchiveVersion
// This will be set when building from git using make
case gitVersion != "":
if !strings.HasPrefix(gitVersion, "v") {
// if an annotated tag is found, the git describe string will be similar to:
// v0.7.2-15-g2c897d90
// When using shallow clones, the commit being built
// may not have an annotated tag in its history,
// `git describe` will only be the abbreviated commit hash in this case:
// 2c897d90
return fmt.Sprintf("git%s", gitVersion)
}
return gitVersion
// moduleVersionFromBuildInfo() will be set when using `go install`
default: