Skip to content

Commit

Permalink
WIP test
Browse files Browse the repository at this point in the history
Signed-off-by: AnthonyAmanse <[email protected]>
  • Loading branch information
AnthonyAmanse committed Mar 27, 2019
1 parent 7d79fd7 commit 50aacbc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package cmd

import (
"fmt"

"github.com/apache/incubator-openwhisk-wskdeploy/utils"
"github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
"github.com/apache/incubator-openwhisk-wskdeploy/wskprint"
Expand All @@ -38,5 +39,9 @@ var versionCmd = &cobra.Command{
// Note: no need to translate the following string
// TODO(#767) - Flags.CliVersion are not set during build
fmt.Sprintf("wskdeploy version: %s", utils.Flags.CliVersion))
wskprint.PrintlnOpenWhiskOutput(
fmt.Sprintf("wskdeploy git commit: %s", utils.Flags.CliGitCommit))
wskprint.PrintlnOpenWhiskOutput(
fmt.Sprintf("wskdeploy build date: %s", utils.Flags.CliBuildDate))
},
}
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ func main() {

var (
//Version ...The Version of the tool
Version = "unset"
Version = "unset"
GitCommit = "unset"
BuildDate = "unset"
)

func init() {
utils.Flags.CliVersion = Version
utils.Flags.CliGitCommit = GitCommit
utils.Flags.CliBuildDate = BuildDate
}
2 changes: 2 additions & 0 deletions utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type WskDeployFlags struct {
ApiVersion string // OpenWhisk version
CfgFile string
CliVersion string
CliGitCommit string
CliBuildDate string
ProjectPath string
DeploymentPath string
ManifestPath string
Expand Down

0 comments on commit 50aacbc

Please sign in to comment.