diff options
author | Valery Piashchynski <[email protected]> | 2020-12-26 01:27:29 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-26 01:27:29 +0300 |
commit | de4d0b6e66ceda08b0daec18a218c1baa71ebf04 (patch) | |
tree | 7bbef377bc97128fb356cad89bd2b40d43aa67f6 /cmd | |
parent | 6fe39bc935ceb847b21c289adaf700035454de6b (diff) |
Add --version flag
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/cli/root.go | 1 | ||||
-rw-r--r-- | cmd/cli/version.go | 9 | ||||
-rw-r--r-- | cmd/main.go | 8 |
3 files changed, 10 insertions, 8 deletions
diff --git a/cmd/cli/root.go b/cmd/cli/root.go index eb15f565..7b18a22f 100644 --- a/cmd/cli/root.go +++ b/cmd/cli/root.go @@ -25,6 +25,7 @@ var ( Use: "rr", SilenceErrors: true, SilenceUsage: true, + Version: Version, } ) diff --git a/cmd/cli/version.go b/cmd/cli/version.go new file mode 100644 index 00000000..6a259668 --- /dev/null +++ b/cmd/cli/version.go @@ -0,0 +1,9 @@ +package cli + +var ( + // Version - defines build version. + Version string = "local" //nolint:deadcode + + // BuildTime - defined build time. + BuildTime string = "development" //nolint:deadcode +) diff --git a/cmd/main.go b/cmd/main.go index a18d2c0d..4e7fc099 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,14 +17,6 @@ import ( "github.com/spiral/roadrunner/v2/plugins/rpc" ) -var ( - // Version - defines build version. - Version string = "local" //nolint:deadcode - - // BuildTime - defined build time. - BuildTime string = "development" //nolint:deadcode -) - func main() { var err error cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel), endure.RetryOnFail(false)) |