Pass version from main

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2019-12-31 12:22:21 +00:00
committed by Alex Ellis
parent 17a5e2c625
commit 300d8b082a
5 changed files with 36 additions and 27 deletions

View File

@ -13,7 +13,16 @@ func init() {
rootCommand.AddCommand(installCmd)
}
func Execute() error {
var (
// GitCommit Git Commit SHA
GitCommit string
// Version version of the CLI
Version string
)
func Execute(gitCommit, version string) error {
GitCommit = gitCommit
Version = version
if err := rootCommand.Execute(); err != nil {
return err