2017-06-26 23:46:34 +02:00
|
|
|
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-04-12 19:38:12 +02:00
|
|
|
package main
|
2016-11-15 20:30:34 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2017-05-18 20:38:28 +02:00
|
|
|
"github.com/pulumi/lumi/pkg/util/cmdutil"
|
2016-11-15 20:30:34 +01:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2017-05-18 20:38:28 +02:00
|
|
|
const version = "0.0.1" // TODO[pulumi/lumi#13]: a real auto-incrementing version number.
|
2016-11-15 20:30:34 +01:00
|
|
|
|
|
|
|
func newVersionCmd() *cobra.Command {
|
|
|
|
return &cobra.Command{
|
|
|
|
Use: "version",
|
2017-05-18 20:38:28 +02:00
|
|
|
Short: "Print Lumi's version number",
|
2017-04-12 20:12:25 +02:00
|
|
|
Run: cmdutil.RunFunc(func(cmd *cobra.Command, args []string) error {
|
2017-05-18 20:38:28 +02:00
|
|
|
fmt.Printf("Lumi version %v\n", version)
|
2017-03-07 14:47:42 +01:00
|
|
|
return nil
|
|
|
|
}),
|
2016-11-15 20:30:34 +01:00
|
|
|
}
|
|
|
|
}
|