-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
- Loading branch information
1 parent
a44ee22
commit ca0e0d1
Showing
10 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## kyverno-json version | ||
|
||
Prints the version informations. | ||
|
||
### Synopsis | ||
|
||
Prints the version informations. | ||
|
||
|
||
``` | ||
kyverno-json version [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
# Print version infos | ||
kyverno-json version | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for version | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [kyverno-json](kyverno-json.md) - kyverno-json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package version | ||
|
||
import ( | ||
"runtime/debug" | ||
) | ||
|
||
// BuildVersion is provided by govvv at compile-time | ||
var BuildVersion string | ||
|
||
func Version() string { | ||
if BuildVersion == "" { | ||
bi, ok := debug.ReadBuildInfo() | ||
if !ok { | ||
return "---" | ||
} | ||
BuildVersion = bi.Main.Version | ||
} | ||
return BuildVersion | ||
} | ||
|
||
func Time() string { | ||
bi, ok := debug.ReadBuildInfo() | ||
if ok { | ||
for _, setting := range bi.Settings { | ||
if setting.Key == "vcs.time" { | ||
return setting.Value | ||
} | ||
} | ||
} | ||
return "---" | ||
} | ||
|
||
func Hash() string { | ||
bi, ok := debug.ReadBuildInfo() | ||
if ok { | ||
for _, setting := range bi.Settings { | ||
if setting.Key == "vcs.revision" { | ||
return setting.Value | ||
} | ||
} | ||
} | ||
return "---" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## kyverno-json version | ||
|
||
Prints the version informations. | ||
|
||
### Synopsis | ||
|
||
Prints the version informations. | ||
|
||
|
||
``` | ||
kyverno-json version [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
# Print version infos | ||
kyverno-json version | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for version | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [kyverno-json](kyverno-json.md) - kyverno-json | ||
|