Merge pull request #165 from mslacken/version

Version
This commit is contained in:
Christian Goll
2021-12-08 21:27:34 +01:00
committed by GitHub
6 changed files with 55 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
package version
var Version string = "development"
func GetVersion() string {
return Version
}

View File

@@ -9,6 +9,7 @@ import (
"syscall"
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/hpcng/warewulf/internal/pkg/version"
"github.com/pkg/errors"
)
@@ -53,7 +54,7 @@ func DaemonStart() error {
fmt.Fprintf(p, "%d", pid)
fmt.Printf("Started Warewulf server at PID: %d\n", pid)
fmt.Printf("Started Warewulf (%s) server at PID: %d\n", version.GetVersion(), pid)
}