Extract file for version command

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2019-12-31 12:18:27 +00:00
parent f0172e618a
commit 17a5e2c625
4 changed files with 43 additions and 58 deletions

View File

@ -1,13 +1,13 @@
package pkg
var (
//GitCommit Git Commit SHA
// GitCommit Git Commit SHA
GitCommit string
//Version version of the CLI
// Version version of the CLI
Version string
)
//GetVersion get latest version
// GetVersion get latest version
func GetVersion() string {
if len(Version) == 0 {
return "dev"
@ -15,6 +15,7 @@ func GetVersion() string {
return Version
}
// Logo for version and root command
const Logo = ` __ _
/ _| __ _ __ _ ___ __| |
| |_ / _` + "`" + ` |/ _` + "`" + ` / __|/ _` + "`" + ` |