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-09-22 04:18:21 +02:00
|
|
|
package cmd
|
2016-11-15 20:30:34 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2017-09-22 04:18:21 +02:00
|
|
|
"github.com/pulumi/pulumi/pkg/util/cmdutil"
|
2016-11-15 20:30:34 +01:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2017-10-16 22:50:00 +02:00
|
|
|
func newVersionCmd(version string) *cobra.Command {
|
2016-11-15 20:30:34 +01:00
|
|
|
return &cobra.Command{
|
|
|
|
Use: "version",
|
2017-09-22 04:18:21 +02:00
|
|
|
Short: "Print Pulumi's version number",
|
2017-04-12 20:12:25 +02:00
|
|
|
Run: cmdutil.RunFunc(func(cmd *cobra.Command, args []string) error {
|
2017-10-16 22:50:00 +02:00
|
|
|
fmt.Printf("%v\n", version)
|
2017-03-07 14:47:42 +01:00
|
|
|
return nil
|
|
|
|
}),
|
2016-11-15 20:30:34 +01:00
|
|
|
}
|
|
|
|
}
|