Files
atlantis/cmd/version.go
Luke Kysow 8fbe662185 Return error if workspace doesn't exist (#61)
* Return error if workspace doesn't exist
* Default data dir to ~/.atlantis. Don't clean workspaces
* Run goimports
2017-07-01 16:17:22 -07:00

21 lines
338 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the current Atlantis version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("atlantis %s\n", viper.Get("version"))
},
}
func init() {
RootCmd.AddCommand(versionCmd)
}